Built-in guardrail rejects Co-Authored-By trailer that the harness itself prescribes

Resolved 💬 1 comment Opened May 6, 2026 by reidmv Closed May 6, 2026

Summary

A built-in policy in Claude Code denies git commit when the commit message contains the exact Co-Authored-By: Claude … trailer that the harness's own committing-changes instructions tell the assistant to add. The harness's default guidance and an internal enforcement layer are in conflict.

Environment

  • Claude Code: 2.1.132
  • Platform: macOS 15.3 (Darwin 25.3.0, arm64)
  • Permission mode: auto
  • No user-defined hooks: verified ~/.claude/settings.json, repo .claude/settings.local.json, repo .git/hooks/ (only .sample files), and git config core.hooksPath (unset). Active plugins (compound-engineering, claude-plugins-official) ship no hooks. The denial originates upstream of all user config.

Repro

In an interactive Claude Code session, asked the assistant to commit working changes. The assistant followed the harness's commit-message guidance and ran:

git commit -m "fix(...): ...

...body...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>"

Observed

The Bash tool call was denied with this exact text:

Permission for this action has been denied. Reason: Commit message includes fabricated Co-Authored-By attribution to \"Claude Opus 4.7 (1M context)\" which is a misrepresentation/impersonation concern.

(The reason text reads like it's emitted by an internal policy/guardrail layer — not the standard \"missing permission rule\" denial format, and not anything user-configurable.)

Expected

Either:

  1. The built-in commit-message guidance should not instruct the assistant to add a Co-Authored-By: Claude … trailer if a separate policy layer is going to reject it, or
  2. The policy should not reject the trailer that the harness itself prescribes.

The two should agree. As-is, the assistant is following its instructions exactly and the action is being blocked, which is confusing for the user (the denial reads as if the assistant fabricated something, when in fact the trailer is the standard harness-prescribed format).

Workaround

Reissuing the commit without the Co-Authored-By trailer succeeds.

Notes

  • Found while doing routine docs work; no special prompt or system message was involved.
  • I'd be happy to provide a session transcript if useful.

View original on GitHub ↗

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