[BUG] "sonnet" model alias resolves to claude-sonnet-4-5 instead of claude-sonnet-4-6 (v2.1.97)

Resolved 💬 3 comments Opened Apr 9, 2026 by ersil Closed May 23, 2026

Description

In Claude Code v2.1.97, the "sonnet" model alias in settings.json resolves to claude-sonnet-4-5 when spawning subagents, even though claude-sonnet-4-6 is the latest available Sonnet model. The main session itself runs on claude-sonnet-4-6, but every subagent process is spawned with --model claude-sonnet-4-5 explicitly.

Steps to Reproduce

  1. Set settings.json to "model": "sonnet"
  2. Start a Claude Code session and run any task that spawns subagents
  3. Run ps aux | grep "\.local/bin/claude" and inspect the --model flag on spawned subprocesses

Expected Behavior

The "sonnet" alias should resolve to the latest Sonnet model (claude-sonnet-4-6), consistent with how the main session is started.

Actual Behavior

Subagents are spawned with --model claude-sonnet-4-5:

/Users/harshils/.local/bin/claude --output-format stream-json --verbose --input-format stream-json --model claude-sonnet-4-5 --resume ... --disallowedTools ...

Impact

  • Users unknowingly run subagents on an older, more expensive model
  • The main session and subagents run on different model versions, which can cause inconsistent behavior
  • Workaround: explicitly pin "model": "claude-sonnet-4-6" in settings.json

Environment

  • Claude Code version: 2.1.97
  • OS: macOS (Darwin 25.4.0)
  • Shell: fish

View original on GitHub ↗

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