Set Claude Code to opusplan so planning uses Opus and execution uses Sonnet, and pin ANTHROPIC_DEFAULT_SONNET_MODEL to claude-sonnet-4-6 to avoid the sonnet alias resolving to Sonnet 5 or 4.5 on different cloud platforms.
Suitable tasks: Day-to-day coding, long-session implementation, and Claude Code workflows where you need to control weekly quota usage; use a stronger model for planning/architecture and Sonnet 4.6 for execution.
Unsuitable tasks: Sessions that must use the same model end to end; needing 1M context without enabling extra-usage; treating the sonnet alias as always equal to 4.6.
Applicable model versions: When you need to pin Claude Sonnet 4.6, use the full ID claude-sonnet-4-6, not just sonnet.
Applicable clients, agents, or APIs: Claude Code CLI; alias resolution differs across Anthropic API, Claude Platform on AWS, Bedrock, Vertex, and Foundry.
Recommended reasoning tier and parameters: Use Sonnet 4.6 for day-to-day execution; planning stages use Opus. The official sonnet alias already resolves to Sonnet 5 on the Anthropic API and still resolves to Sonnet 4.6 on AWS Claude Platform.
Switch within a session to "Opus for planning, Sonnet for execution":
/model opusplanPin Sonnet 4.6 as the execution model (and optionally pin Opus to the 1M window) in ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6"
}
}If you only want Sonnet 4.6 for the current project and do not want to follow the latest sonnet alias, you can also specify it explicitly at startup:
claude --model claude-sonnet-4-6Official alias table entries directly relevant to this configuration:
| Alias | Behavior |
|---|---|
sonnet | Uses the latest Sonnet recommended by the current provider; not pinned to 4.6 |
opusplan | Uses Opus in Plan mode, then switches to Sonnet for execution |
sonnet[1m] / opus[1m] | Enables the 1M context window for the corresponding model family |
Run /model or check the current session model to confirm the execution-stage actual ID is claude-sonnet-4-6, not Sonnet 5 / 4.5 resolved from the sonnet alias.
On the same repository, run /model opusplan and a full-session /model claude-sonnet-4-6 separately; record weekly quota consumption, planning quality, and implementation diffs.
If you need a 1M window, first confirm whether your plan requires /extra-usage; on Max 5x you may see Extra usage is required for 1M context.
Pin the Claude Code version before comparing: official documentation states that sonnet/opus alias resolution changes with CLI version and provider.
Official documentation defines opusplan as: Plan mode uses opus, then switches to sonnet for execution.
Official provider alias table: on Anthropic API, sonnet → Sonnet 5; on Claude Platform on AWS, sonnet → Sonnet 4.6; on Bedrock / Agent Platform / Foundry, sonnet → Sonnet 4.5.
Official guidance: when alias resolution points to an older model, override with the full model name or ANTHROPIC_DEFAULT_SONNET_MODEL / ANTHROPIC_DEFAULT_OPUS_MODEL.
Community configuration discussion on r/ClaudeCode provides a settings.json pattern consistent with the official environment variables and points to the same model-config documentation; that configuration addresses /opusplan falling back to a 200k window.
The sonnet inside opusplan is still subject to provider alias resolution; without setting ANTHROPIC_DEFAULT_SONNET_MODEL, you cannot guarantee the execution model is 4.6.
[1m] is not a free capability: official and community sources both record that 1M context may trigger extra-usage.
This page covers model selection and window configuration, not copy-paste task prompts.
Aliases update with CLI versions; at collection time the documentation already mentioned Fable 5 and Sonnet 5. To reproduce 4.6 behavior you must pin the ID.
Official definition of opusplan: special mode that uses opus during plan mode, then switches to sonnet for execution (short compliant paraphrase).
Claude Sonnet 4.6