Task list shows parent session's model for subagents, misleading after automatic model fallback
Summary
The background task list (ctrl+o) shows a subagent's model as the parent session's current model, not the model the subagent actually runs on. The mismatch becomes user-visible (and alarming) when the parent session has been through an automatic model fallback.
Environment
- Claude Code CLI 2.1.207, macOS (darwin 25.2.0)
- Parent session started on
claude-fable-5
Chain of events
- A session running on
claude-fable-5hit an automatic server-side model fallback mid-run. The transcript records an assistant message whose content is afallbackblock:{"type": "fallback", "from": {"model": "claude-fable-5"}, "to": {"model": "claude-opus-4-8"}}. From that point the session's main-chain assistant messages areclaude-opus-4-8, and the job'sstate.jsonrespawnFlagswere updated to--model claude-opus-4-8. - After the fallback, the (now Opus) session spawned a background subagent via the Agent tool with an explicit
model: "fable"override, per user instruction. - The spawn confirmation UI correctly showed the subagent as
Fable 5:
````
claude(<label>) Fable 5
Backgrounded agent (↓ to manage · ctrl+o to expand)
- But the task list row shows the parent's post-fallback model:
````
◯ local_agent · Opus 4.8 · <label> · 1m · 113.5k tok
- Ground truth: the subagent's transcript (
~/.claude/projects/<project>/<session>/subagents/agent-<id>.jsonl) has every assistant message stamped"model":"claude-fable-5". The explicit model override worked; only the display is wrong.
Note the fan entry for the subagent in the job's state.json records only id/kind/label/startedAt, with no model field, so the renderer appears to fall back to the session model.
Expected
The task list row shows the model the subagent actually runs on (Fable 5 here), consistent with the spawn confirmation UI.
Actual
The row shows the parent session's current model (Opus 4.8 after the fallback), so a user who explicitly requested a Fable subagent sees it apparently running on Opus and cannot tell whether the override was honored without grepping the subagent transcript.
Suggested fix
Record the resolved model per fan/agent entry at spawn time and render that, instead of inheriting the session's (mutable) model at render time.