Explicit subagent model pin is lost when a background agent is woken or resumed — agent continues on the session model

Open 💬 3 comments Opened Jul 7, 2026 by MelFender

A background subagent launched with an explicit model pin (for example model: "sonnet" on the Agent tool) runs the pinned model on its initial turn. But any continuation — either a task-notification wake when its own background work finishes, or a SendMessage resume — re-resolves the model to the session model instead of the pin. On a session whose main loop runs claude-fable-5, the pinned agent silently continues on Fable.

Verified with a controlled probe on v2.1.201 (July 6, 2026): the same agent transcript shows claude-sonnet-5 on the launch turn and claude-fable-5 on the woken turn. In one earlier incident (July 4), 8 of 8 sonnet-pinned background agents flipped this way in a single night (~470 unintended Fable turns).

CLAUDE_CODE_SUBAGENT_MODEL cannot mitigate this without also overriding all explicit per-launch pins, since a hard value there takes precedence over them (docs: sub-agents → model selection).

Expected: a model pin holds for the agent's whole lifetime, including wakes and resumes.

Impact: silent frontier-model consumption against subscription limits, contrary to explicit configuration. Deterministic repro steps and transcript excerpts available on request.

Environment: Claude Code v2.1.201, macOS (also observed on Linux), Max subscription, main loop on claude-fable-5[1m].

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗