[Bug] Agent tool model parameter ignored; subagents inherit session/settings model instead of override
Bug Description
Title: Agent tool model parameter is ignored — subagents resolve to the settings/session model instead of the per-call override
Environment: Claude Code CLI 2.1.220, macOS (darwin 25.5.0). Main session model: claude-fable-5 (session-level selection). User settings (~/.claude/settings.json): "model": "opus[1m]". Spawns via the Agent tool, subagent_type: "general-purpose", both run_in_background: true and false.
Expected: Per the Agent tool's own schema — "Optional model override for this agent. Takes precedence over the agent definition's model frontmatter" — a call with model: "sonnet" should run the subagent on Sonnet.
Actual: The model parameter has no effect. Observed in two configurations on 2026-08-03/04 across ~10 spawns, all with explicit model: "sonnet":
- Subagents inspected in the UI as Opus 5 — matching the settings-file model (opus[1m]), not the requested pin.
- Later spawns in the same session inspected as Fable 5 — inheriting the session model, again not the pin.
Repro:
- Set "model": "opus[1m]" in ~/.claude/settings.json (or run the session on any non-Sonnet model).
- From the session, invoke the Agent tool with model: "sonnet" and any prompt.
- Inspect the running subagent in the UI → it shows the session/settings model, not Sonnet.
Impact: Severe cost amplification with no signal to the model. Routine fan-out work (repo audits, PR prep) intended for Sonnet ran at Opus/Fable (Mythos-class) pricing; on a capped weekly Fable budget this forced the user to manually kill three running agents mid-task. The tool result gives the orchestrating model no indication the pin was dropped, so it reports the wrong model to the user in good faith.
Workaround: None Claude-side — we've moved all delegation to an external CLI (OpenAI Codex) dispatched via Bash. A fix, or even an error/warning when the requested model can't be honored, would restore Claude-side delegation.
Environment Info
- Platform: darwin
- Terminal: xterm-256color
- Version: 2.1.220
- Feedback ID: d320cde9-b84c-4e15-8939-30bf3037b5da
Errors
[]This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗