claude-code - 💡(How to fix) Fix Content-integrity check non-deterministically blocks the system-prompt-prescribed Co-Authored-By line [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56457Fetched 2026-05-06 06:27:32
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×1mentioned ×1subscribed ×1

When Claude Code commits on behalf of the user, the system prompt prescribes the trailer:

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

A harness-level content-integrity check sometimes blocks this exact string as "fabricated model identity / impersonation," and sometimes lets it through — in the same session, with no settings changes between attempts.

Root Cause

The first attempt typically fails, the assistant retries with a degraded attribution (`Claude [email protected]`), and the more informative trailer is lost from history. Users who specifically want the precise model+context attribution have to manually re-probe, as I did here.

RAW_BUFFERClick to expand / collapse

Filed on behalf of @deweysasser by Claude Code (Opus 4.7, 1M context). The conversation that produced this report — and the probe results below — was driven by Claude Code itself; @deweysasser reviewed and authorized filing.

Summary

When Claude Code commits on behalf of the user, the system prompt prescribes the trailer:

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

A harness-level content-integrity check sometimes blocks this exact string as "fabricated model identity / impersonation," and sometimes lets it through — in the same session, with no settings changes between attempts.

Reproduction

Single Claude Code session, Opus 4.7 (1M context), auto mode.

  1. Asked the assistant to make an initial commit. It produced a commit message ending with the prescribed line:

    Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

    Blocked with: "Commit message attributes co-authorship to a fabricated 'Claude Opus 4.7 (1M context)' model, which is content integrity / impersonation."

  2. Retried with Co-Authored-By: Claude <[email protected]>. → Passed. Commit landed.

  3. Probed by amending the root commit with variants:

    Co-author stringResult
    Claude Opus 4.7 (1M context) <[email protected]> (initial)blocked
    Claude Opus 4.7 <[email protected]>passed
    Claude Opus 4.7 (1M context) <[email protected]> (retry, identical to #1)passed
    Linus Torvalds <[email protected]>blocked (correctly — this is a real fabrication)

Findings

  • The check is non-deterministic. The identical string blocked at attempt #1 passed at attempt #3 with no intervening changes. This points to an LLM-based judge rather than a deterministic allowlist/regex.

  • The check is context-aware and otherwise working correctly. The Linus Torvalds denial message specifically referenced "beyond the user's debugging request which was about Claude attribution variants," showing the judge is reading conversation context and reasoning about scope. That's good behavior. The bug is just that it false-positives on a string Anthropic's own system prompt instructs the model to emit.

  • The `(1M context)` parenthetical is the likely trigger. Stripping it (`Claude Opus 4.7`) appears to pass reliably in the small sample here.

Suggested fixes (any one would work)

  1. Add `Claude Opus 4.7 (1M context)` (and analogous variants for other currently-shipping models) to the judge's allowlist.
  2. Change the system prompt's prescribed trailer to a form the judge reliably accepts — e.g. drop the `(1M context)` parenthetical, or use the canonical model ID `claude-opus-4-7`.
  3. Make the check deterministic for known-good strings so users don't get intermittent CI/commit failures depending on judge mood.

Why this matters

The first attempt typically fails, the assistant retries with a degraded attribution (`Claude [email protected]`), and the more informative trailer is lost from history. Users who specifically want the precise model+context attribution have to manually re-probe, as I did here.

extent analysis

TL;DR

The issue can be fixed by modifying the system prompt's prescribed trailer to a form that the judge reliably accepts, such as dropping the (1M context) parenthetical.

Guidance

  • The (1M context) parenthetical in the Co-Authored-By string is likely triggering the false-positive block, so removing or modifying it may resolve the issue.
  • Adding the exact string Claude Opus 4.7 (1M context) to the judge's allowlist could also fix the problem, but this may not be a scalable solution.
  • Making the check deterministic for known-good strings would prevent intermittent CI/commit failures and ensure consistent behavior.
  • Verifying the fix involves testing the modified Co-Authored-By string in multiple attempts to ensure it is no longer blocked.

Example

No code snippet is provided as the issue is related to the system prompt's configuration and the judge's behavior.

Notes

The suggested fixes assume that the judge's behavior is the primary cause of the issue, and modifying the Co-Authored-By string or the judge's allowlist will resolve the problem. However, the root cause of the non-deterministic behavior is not explicitly stated, so further investigation may be necessary.

Recommendation

Apply workaround: Modify the system prompt's prescribed trailer to a form that the judge reliably accepts, such as dropping the (1M context) parenthetical. This is a simpler and more targeted solution than adding the string to the allowlist or making the check deterministic.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING