[FEATURE] Mod API: add model (and effort) to AgentInfo in $.agent.list()

Status Open
Reported on v2.1.299
Maintainer reply None cached
Activity 0 comments · opened Oct 14, 2026

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

  1. Main runs on Opus; /code-review spawns one finder on Sonnet and one on a GPT model; a teammate runs on Sonnet.
  2. A mod reads $.agent.list() and shows · sonnet 5.5 next to each agent whose model differs from main's.
  3. 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.

View original on GitHub ↗