Agent tool's model:"opus" alias resolves to claude-opus-4-8 instead of claude-opus-5

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 2 comments · opened Jul 29, 2026

CLI version: 2.1.220 (latest on npm)

Observed: Spawning a subagent via the Agent tool with model: "opus" produces an API call with "model":"claude-opus-4-8" (confirmed in the session's subagent transcript, ~/.claude/projects/*/subagents/*.jsonl, model field on assistant messages).

Expected: Should resolve to claude-opus-5 — Claude Opus 5 was released 2026-07-24 and is documented as the new default Opus.

Why this looks like a real bug, not user error: the same installed binary contains an internal reference table (OPUS_ID:"claude-opus-5", PREV_OPUS_ID:"claude-opus-4-8") confirming the CLI itself already treats Opus 5 as current and 4.8 as previous elsewhere. So the alias used specifically for subagent spawning (Agent tool model param) appears to resolve through a separate/stale path from the rest of the app.

Ruled out: switchModelsOnFlag in settings.json — that controls safety-flag fallback behavior, unrelated to model-version defaults.

Not a workaround-able client-side issue: the Agent tool's model parameter only accepts the fixed enum (sonnet/opus/haiku/fable), so a literal model-ID override isn't possible from the call site.

Repro:

  1. Call the Agent tool with model: "opus".
  2. Inspect the resulting subagent transcript's model field on assistant messages.
  3. Observe claude-opus-4-8 instead of claude-opus-5.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗