System prompt hardcodes 'Claude Opus 4.7 (1M context)' in commit attribution regardless of active model
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 2 comments · opened Jun 9, 2026 · closed Aug 22, 2026
Description
The built-in system prompt instructs the model to append the following trailer to every commit message:
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This string is hardcoded. When the user switches models (e.g. /model sonnet), the commit attribution still says Opus 4.7. The attribution does not reflect the model that actually wrote the code.
Steps to reproduce
- Start a session with the default model (Opus 4.7)
- Switch to a different model:
/model sonnet - Ask Claude to make a commit
- Observe the Co-Authored-By trailer still reads
Claude Opus 4.7 (1M context)
Expected behavior
The Co-Authored-By trailer should reflect the model that is currently active when the commit is made — not the model that was active when the session started, and not a hardcoded model name.
Attempted workarounds
- Setting
attribution.commitin~/.claude/settings.jsondoes not help because the model still manually appends the hardcoded string from system prompt instructions, resulting in a duplicate or conflicting trailer. - The only real fix is for the system prompt instructions to interpolate the current model name dynamically rather than hardcode it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗