Task tool model="opus" resolves to claude-opus-4-1 instead of latest opus or user-configured model
Problem
The Task tool's model parameter accepts short names: "opus", "sonnet", "haiku". When model="opus" is passed, Claude Code resolves it to claude-opus-4-1 internally, regardless of:
- The user's configured model in
~/.claude/settings.json(e.g.,"model": "claude-opus-4-6") - The parent session's actual running model (e.g.,
claude-opus-4-6)
Organizations that have disabled claude-opus-4-1 via org policy (while allowing claude-opus-4-6) see Task tool calls with model="opus" fail or silently fall back to a different model.
Steps to Reproduce
- Set
"model": "claude-opus-4-6"in~/.claude/settings.json - Have org policy block
claude-opus-4-1but allowclaude-opus-4-6 - Use the Task tool with
model="opus":
````
Task(
prompt="...",
subagent_type="general-purpose",
model="opus"
)
- The agent fails to start on opus because Claude Code maps
"opus"toclaude-opus-4-1, which is blocked
Expected Behavior
model="opus" should resolve to either:
- The latest available opus model (
claude-opus-4-6), or - The user's configured opus model from
settings.json, or - The parent session's model if it's already an opus variant
Actual Behavior
model="opus" is hard-coded to resolve to claude-opus-4-1, which may be blocked by org policy.
Workaround
Omit the model parameter entirely when opus is desired. The Task tool inherits the parent session's model, which is claude-opus-4-6 per settings.json. This requires modifying any tooling that passes model="opus" to instead not pass a model parameter.
Environment
- Claude Code running on
claude-opus-4-6 ~/.claude/settings.json:"model": "claude-opus-4-6"- Org policy:
claude-opus-4-1blocked
Suggestion
The short model names in the Task tool's enum should resolve dynamically to the latest available version of that model family, or respect the user's settings.json configuration, rather than being pinned to a specific version that may become unavailable.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗