[BUG] Agent tool model:"opus" resolves to 1M-context Opus instead of standard Opus 5
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Calling the Agent tool with model: "opus" launches Opus with a 1M-context window, not standard-context Opus 5. Session's own model default was Sonnet (confirmed via /model), and the Agent tool schema documents "opus" as resolving to standard Opus 5, explicitly warning it should "never" resolve to a [1m] variant. Observed the spawned agent labeled "Opus 5 (1M context)" in the UI.
This appears to be a platform-side model-string routing issue, not a caller-side mistake — the Agent tool exposes no separate parameter to select standard-context vs 1M-context Opus, so there is no way to avoid this from the tool-call side.
<img width="1167" height="146" alt="Image" src="https://github.com/user-attachments/assets/98ac2a95-1505-4c7c-a4ae-cc3ff41bac79" />
<img width="181" height="78" alt="Image" src="https://github.com/user-attachments/assets/15ce03ea-96fa-412b-8fa1-1dc7dd3ceeea" />
What Should Happen?
model: "opus" should resolve to standard-context Opus 5, matching the Agent tool's documented behavior.
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session with /model set to Sonnet.
- Call the Agent tool with subagent_type other than "fork", and model: "opus".
- Observe the spawned agent runs on "Opus 5 (1M context)" instead of standard Opus 5.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.234
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗