claude-code - 💡(How to fix) Fix Co-Authored-By system prompt overrides CLAUDE.md, settings.json, and skill instructions — no user escape hatch [2 comments, 3 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#53259Fetched 2026-04-26 05:20:18
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2closed ×1

Root Cause

The Linux kernel project deliberately chose Assisted-by over Co-Authored-By because:

Code Example

**Attribution**:
- AI-assisted commits MUST include trailer: `Assisted-by: AGENT_NAME:MODEL_VERSION [TOOLS]`
- NEVER use `Co-Authored-By: ... <[email protected]>` or `🤖 Generated with Claude Code`
  — kernel.org policy permits `Assisted-by:` only

---

- NEVER add `Co-Authored-By: ... <[email protected]>` or `🤖 Generated with Claude Code`
  trailers/footers. Follow kernel.org policy: `Assisted-by:` only

---

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

---

Assisted-by: Claude:opus-4-6 [ruff, mypy]
RAW_BUFFERClick to expand / collapse

The problem

Claude Code's system prompt contains a hardcoded instruction to append Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> to every commit. This instruction cannot be reliably overridden by any user-facing mechanism — not CLAUDE.md, not settings.json, not custom skills, not even explicit in-session instructions.

This is not a new report (see #4287, #36105, #45137, #52483, #31776), but I want to document the full scope: every available override mechanism fails, and the philosophical framing (Co-Authored-By vs Assisted-by) has real implications for projects that follow established attribution policies.

What I configured (all of it ignored)

1. Global CLAUDE.md — AI Coding Assistant Policy

Adapted from kernel.org/process/coding-assistants:

**Attribution**:
- AI-assisted commits MUST include trailer: `Assisted-by: AGENT_NAME:MODEL_VERSION [TOOLS]`
- NEVER use `Co-Authored-By: ... <[email protected]>` or `🤖 Generated with Claude Code`
  — kernel.org policy permits `Assisted-by:` only

2. Custom skills (committing-changes, fixing-bugs)

- NEVER add `Co-Authored-By: ... <[email protected]>` or `🤖 Generated with Claude Code`
  trailers/footers. Follow kernel.org policy: `Assisted-by:` only

3. settings.json attribution.commit

Setting this to "" (empty string) is documented as disabling the trailer. It doesn't (#45137).

4. In-session explicit instruction

Even telling Claude directly "do not add Co-Authored-By" is inconsistent — it sometimes complies, sometimes doesn't, depending on which code path handles the commit.

What actually happens

The system prompt instruction wins. Commits get:

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

instead of:

Assisted-by: Claude:opus-4-6 [ruff, mypy]

In my repo's history, commits made through the fixing-bugs skill (which has the explicit NEVER instruction) correctly used Assisted-by:. But commits made through the default commit flow added Co-Authored-By: despite CLAUDE.md saying otherwise. Same session, same CLAUDE.md loaded, different behavior depending on code path.

Why this matters

1. The [email protected] email is absurd

This email address appears in git log, git shortlog, GitHub contributor graphs, and git blame. It attributes commits to a non-existent Anthropic employee. It's corporate branding injected into user repositories without consent or reliable opt-out. No other dev tool does this — your IDE doesn't add Co-Authored-By: JetBrains <[email protected]> to commits.

2. Co-Authored-By implies shared authorship

The Linux kernel project deliberately chose Assisted-by over Co-Authored-By because:

  • Co-Authored-By implies shared responsibility — but AI cannot review code, certify licensing, or be held accountable
  • Assisted-by correctly frames AI as a tool, like a spell-checker or a linter
  • The human is the sole author and takes full responsibility

This distinction matters for compliance (DCO, CLA), legal liability, and intellectual honesty.

3. Users have no control

The system prompt says (emphasis mine):

"Codebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default behavior and you MUST follow them exactly as written."

But the commit template in the same system prompt contradicts this — it's a hardcoded instruction that the model treats as higher priority than CLAUDE.md. Users are told their instructions override defaults, but they don't. This creates a trust gap: if I can't override a commit trailer, what else can't I override?

What should change

  1. Respect attribution.commit — if set to "", do not add any trailer. This is already documented behavior that doesn't work (#45137)
  2. Make the trailer format configurable — allow attribution.commit to accept a template string (e.g., "Assisted-by: Claude:{model} [{tools}]")
  3. Change the default from Co-Authored-By to Assisted-by — align with the kernel.org standard that the open-source community is converging on
  4. Remove [email protected] — AI tools are not GitHub users. If attribution is desired, use a format that doesn't masquerade as a human contributor
  5. Honor the documented priority — if CLAUDE.md says "NEVER use X", the system prompt must not force X. The user's instructions should genuinely override defaults, as promised

Environment

  • Claude Code version: latest (Opus 4.6, 1M context)
  • Platform: macOS (darwin)
  • Affected: all commit paths (direct commit, skill-based commit, PR creation)

Related issues

  • #4287 — includeCoAuthoredBy: false ignored
  • #36105 — Feature request for Assisted-by format
  • #45137 — attribution.commit: "" doesn't disable trailer
  • #52483 — Co-Authored-By persists despite CLAUDE.md and skills
  • #31776 — CLAUDE.md commit conventions overridden by system prompt
  • #29999 — "stop branding user work"
  • #47579 — "added without user consent or opt-out"

extent analysis

TL;DR

The issue can be addressed by making the commit trailer format configurable and respecting the attribution.commit setting to allow users to override the default Co-Authored-By trailer.

Guidance

  • Review the attribution.commit setting in settings.json to ensure it is correctly configured to disable or customize the commit trailer.
  • Consider using a custom skill with explicit instructions to avoid adding the Co-Authored-By trailer, although this may not be reliable due to the hardcoded system prompt instruction.
  • Verify that the CLAUDE.md file is correctly formatted and loaded, as it should contain the attribution policy, including the preferred Assisted-by format.
  • Test different commit paths (direct commit, skill-based commit, PR creation) to ensure the issue is consistently reproduced and to identify any variations in behavior.

Example

No code snippet is provided as the issue is related to configuration and system behavior rather than code.

Notes

The issue is specific to the Claude Code version (Opus 4.6, 1M context) and platform (macOS), but similar issues have been reported across different versions and platforms. The solution may require changes to the Claude Code system prompt or configuration options.

Recommendation

Apply a workaround by setting attribution.commit to a custom template string (if supported) or an empty string to disable the trailer, and verify that the system prompt instruction does not override this setting. If this is not possible, consider using a different commit tool or workflow that allows for more control over commit trailers.

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