Task list shows parent session's model for subagents, misleading after automatic model fallback

Open 💬 0 comments Opened Jul 11, 2026 by yscheef

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

  1. A session running on claude-fable-5 hit an automatic server-side model fallback mid-run. The transcript records an assistant message whose content is a fallback block: {"type": "fallback", "from": {"model": "claude-fable-5"}, "to": {"model": "claude-opus-4-8"}}. From that point the session's main-chain assistant messages are claude-opus-4-8, and the job's state.json respawnFlags were updated to --model claude-opus-4-8.
  2. After the fallback, the (now Opus) session spawned a background subagent via the Agent tool with an explicit model: "fable" override, per user instruction.
  3. The spawn confirmation UI correctly showed the subagent as Fable 5:

``
claude(<label>) Fable 5
Backgrounded agent (↓ to manage · ctrl+o to expand)
``

  1. But the task list row shows the parent's post-fallback model:

``
◯ local_agent · Opus 4.8 · <label> · 1m · 113.5k tok
``

  1. 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.

View original on GitHub ↗