Model's injected self-identity isn't refreshed after a mid-session model switch (self-misidentifies; wrong git co-author trailer)
Open 💬 0 comments Opened Jul 14, 2026 by rec3141
Preflight
- [x] Searched existing issues — did not find this one
- [x] Single bug report
- [x] Reproduced on a current version
Version
Claude Code 2.1.207 (running session; note the binary on PATH reported 2.1.208, so the installed and running versions can differ)
What's wrong
When the active model changes during a session, the identity injected into the model's context — the "You are powered by the model named X" environment block — is not updated. The model keeps believing it is the session's original model for the rest of the session.
Observed
- The session started on one model (Fable 5) and the active model later became another (Opus 4.8), confirmed by
/model→ "currently Opus 4.8". - The model's injected context still stated the original model, so it continued to self-identify as that model — including stamping git commit
Co-Authored-By:trailers asClaude Fable 5on commits that were actually authored while running Opus 4.8. - The model also dismissed the correct
/modelreading as an inconsistency, because its own context contradicted it.
Impact
- Incorrect commit attribution (
Co-Authored-By:names the wrong model). - The model answers "which model are you?" incorrectly.
- Any behavior keyed on model self-identity is wrong for the remainder of the session after a switch.
Note
/model reports the correct current model throughout — only the model's injected self-identity string is stale. So the fix is presumably to refresh that identity block when the active model changes mid-session (the same way /model already knows).