[BUG] Agent Teams' `SendMessage` resume discards subagent's model override to default model

Open 💬 0 comments Opened Jun 11, 2026 by oakif

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:

  1. Silent billing/tier switch: an agent spawned with model: opus answers its follow-up on the session default model, with no warning.
  2. 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

  1. Start Claude Code with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in the process environment, in a session whose default model is not Opus.
  2. 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.
  3. 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".
  4. 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.

View original on GitHub ↗