[FEATURE] Mod API: add model (and effort) to AgentInfo in $.agent.list()
Problem Statement
$.agent.list() lists the session's agents, but AgentInfo has no model. To show which model each subagent or teammate runs on (footer, pane, status line), a mod has to hook agent.spawn, keep result.model in its own map keyed by agentId, and compare it with parentModel.
That map lives in the mod's memory: it is empty after --resume or a mod reload, and agents spawned before the mod loaded never get a model.
Proposed Solution
Add the agent's resolved model to AgentInfo, the value agent.spawn answers as model:
export type AgentInfo = {
// ...existing fields
/** What the agent runs on: the resolved model id (or the alias core answered at spawn). */
model?: string;
/** Its reasoning effort, when one was set. */
effort?: string;
};
Both already live on the task: local_agent has model and effort, in_process_teammate has model.
Alternative Solutions
The agent.spawn map above, which loses everything on resume.
Priority
Medium - Would be very helpful
Feature Category
Developer tools/SDK
Use Case Example
- Main runs on Opus;
/code-reviewspawns one finder on Sonnet and one on a GPT model; a teammate runs on Sonnet. - A mod reads
$.agent.list()and shows· sonnet 5.5next to each agent whose model differs from main's. - After
claude --resume, it still shows them, with no bookkeeping of its own.
Additional Context
Native UI requests for the same information: #89844, #100796. This one asks for the data in the mod API, which also serves status lines and panes. Version 2.1.299, terminal surface.