Sonnet dispatched via Agent tool fails with "1M context required" error
Resolved 💬 3 comments Opened May 23, 2026 by mhuuh Closed Jul 4, 2026
Description
Calling the Agent tool with model: "sonnet" from a Claude Code session (parent: Opus 4.7) fails immediately with:
API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
This happens regardless of prompt size — even a 5-token "reply ok" prompt fails at 0 tokens consumed.
Reproduction
- In a Claude Code session with Opus 4.7 as parent model
- Invoke the
Agenttool withsubagent_type: "general-purpose",model: "sonnet",prompt: "Reply ok" - Immediate error before any tokens are consumed
Expected behavior
Standard-context Sonnet dispatch (200k, or 600k for users in that A/B). This pattern worked previously without requiring 1M context credits.
Actual behavior
Sonnet dispatch is gated behind 1M context credits, which must be explicitly enabled and incur additional cost.
Diagnostic
- Haiku dispatch: works normally (~38k tokens for a small test, no credit error)
- Sonnet dispatch: blocked immediately at 0 tokens with the 1M error
- No local settings (
settings.json,settings.local.json, or anyCLAUDE.mdon the path) reference context size or 1M
Environment
- OS: Windows 11, x64
- Claude Code version: 2.1.144
- Parent model: Opus 4.7
- Flags in use:
--remote-control,--dangerously-skip-permissions - Interactive mode only (no openclaw / non-interactive automation)
Impact
Breaks the documented "Opus orchestrates, Sonnet codes" pattern from the Agent tool description. Either:
- This is intended policy and should be documented (with updated cost guidance for the orchestration pattern), or
- This is an accidental flag and Sonnet dispatch should not require 1M context by default.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗