anthropics / anthropics/claude-code

Subagent self-corrects from stale model id (claude-opus-4-8) to current (claude-opus-5) mid-execution, no local config to blame

Open
#95,550 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:agents area:model bug
Dominant language
TypeScript
Stars
146k
Forks
23.8k
PR merge metrics
PR metrics pending

Description

Summary

A local watcher we run against Claude Code session transcripts flagged 18 occurrences in 24h of sessions/subagent runs that started on model id claude-opus-4-8 and self-corrected to claude-opus-5 partway through the same run, without any user action or config change on our side.

We root-caused one concrete instance: testador-e2e subagent, agentId a75b6aa08802b272e, launched on claude-opus-4-8, switched to claude-opus-5 mid-execution. We audited our own settings/hooks/model config and found nothing in our environment that would cause or explain this — it looks like an internal SDK/CLI model-resolution behavior, not a local misconfiguration.

This looks related to (but distinct from) already-filed model-resolution reports:

  • #83956 (subagent Task launches with one model resolved but served as another)
  • #82252 (subagent model override silently served by a different model, self-report doesn't match)
  • #82466 (default model in settings.json not honored at session start)

What's different here: it's not "wrong model served the whole time" — it's a mid-execution switch away from an already-stale/deprecated model id, happening repeatedly (18x/24h) across otherwise-unrelated sessions, suggesting some background model-alias/version resolution kicking in inconsistently rather than a one-time settings read.

Impact

  • Makes local telemetry/cost-attribution by model unreliable (a single run reports two different models).
  • Makes "which model actually did this work" unanswerable from the transcript alone.
  • Silent and undocumented, so users have no way to distinguish this from an actual bug in their own config.

Ask

  • Confirm whether this is expected/intended background model-alias resolution.
  • If expected, document it (so watchers/telemetry can account for it instead of flagging it as an anomaly).
  • If not expected, treat as a bug alongside #83956 / #82252.

Happy to share more transcript excerpts (with any account-identifying info stripped) if useful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported transcript pattern with the local watcher and compare the model IDs before and after the switch. Review the session, subagent, settings, hooks, and model-resolution behavior implicated in the report, using #83956, #82252, and #82466 for context. Done means the behavior is confirmed as expected and documented, or its cause is identified well enough to fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.