System prompt hardcodes 'Claude Opus 4.7 (1M context)' in commit attribution regardless of active model
Open 💬 1 comment Opened Jun 9, 2026 by patrickadamsprofessional
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 1 comment on GitHub. Read the full discussion on GitHub ↗