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

  1. Start a session with the default model (Opus 4.7)
  2. Switch to a different model: /model sonnet
  3. Ask Claude to make a commit
  4. 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.commit in ~/.claude/settings.json does 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>

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗