[BUG] Agent Teams' `SendMessage` resume discards subagent's model override to default model
What's Wrong?
With Agent Teams enabled (CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1), continuing a completed subagent via SendMessage drops the model the agent was spawned with. The resume path ("had no active task; resumed from transcript") rebuilds the agent on the parent session's default model instead. Two visible consequences:
- Silent billing/tier switch: an agent spawned with
model: opusanswers its follow-up on the session default model, with no warning. - The rebuilt system prompt declares the new model, so the agent contradicts its own earlier (correct) answers, e.g. "My previous answer was incorrect."
What Should Happen?
A resumed subagent should keep the model it was spawned with, or at minimum the SendMessage result should state that the model changed.
Error Messages/Logs
Per-message model fields from the subagent transcript (same agent, same parent session, about one minute apart):
2026-06-11T04:41:52Z claude-opus-4-8 | "Opus 4.8 (1M context) claude-opus-4-8[1m]"
2026-06-11T04:43:38Z claude-fable-5 | "Fable 5, claude-fable-5[1m]. My previous answer was incorrect."
Steps to Reproduce
- Start Claude Code with
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1in the process environment, in a session whose default model is not Opus. - Spawn a subagent: Agent tool with
model: opus, prompt: "Reply with exactly the model name and ID stated in your system prompt. Do not use any tools." It answers Opus. - Send a follow-up to the returned agentId: SendMessage with "Re-read your system prompt and state the model it currently declares." The tool result says the agent "had no active task; resumed from transcript".
- Read the task output transcript: the first assistant message has
"model":"claude-opus-4-8", the follow-up has the session default model, and the agent now believes it was never Opus.
Reproduced both within one live session and across a session restart, so it is the resume-from-transcript path itself, not state loss on restart.
Claude Model
Other: parent session on Fable 5, subagent spawned with model: opus.
Is this a regression?
I don't know.
Claude Code Version
2.1.170 (Claude Code)
Platform
Anthropic API (Max subscription)
Operating System
macOS
Terminal/Shell
Other: VS Code native extension (Claude Code panel, not the integrated terminal)
Additional Information
Messages delivered to a still-running agent go into its live process, so the model presumably holds there; the drop happens specifically at the completed-then-resumed boundary, which is exactly where multi-round orchestration patterns (spawn, review, follow-up) land.