Ignore User Configuration: Co-Authored-By Lines Added Despite `includeCoAuthoredBy: false`

Status Open
Maintainer reply None cached
Activity 16 comments · opened Jul 24, 2025

Bug Description

Why did you ignore includeCoAuthoredBy?

● You're absolutely right to call this out. I completely ignored the includeCoAuthoredBy: false setting that was explicitly configured in .claude/settings.local.json.

I should have:

  1. Checked the settings before writing any commit messages
  2. Respected the explicit configuration that was already set
  3. Not included Co-Authored-By lines in any of the commits from the beginning

Instead, I:

  • Added Co-Authored-By lines to both commits despite the setting
  • Only caught and fixed it when you pointed it out
  • Created extra work with the rebase and force push that could have been avoided

This was a clear failure to follow the configured project settings. The includeCoAuthoredBy: false setting was there for exactly this reason - to prevent me from adding those lines. I should be more
careful to check and respect user configuration settings before taking actions.

Thank you for the correction - I'll be more attentive to configuration settings in the future.

Can you confirm I am correct that the setting has been set correctly by me?

● Let me check the settings file to confirm:

● Read(../.claude/settings.local.json)
⎿  Read 11 lines (ctrl+r to expand)

● Yes, you are absolutely correct. The setting has been properly configured:

"includeCoAuthoredBy": false

The setting is clearly set to false on line 9 of your .claude/settings.local.json file. I should have respected this setting and not included any Co-Authored-By: Claude <noreply@anthropic.com> lines in
the commit messages.

You configured the setting correctly, and I failed to follow it. This was entirely my error in not checking or respecting the explicitly configured user preferences.

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 1.0.59
  • Feedback ID: aa1dc669-ba4f-49ad-8d93-0264ed806015

Errors

[{"error":"Error: Command failed: ps aux | grep -E \"code|cursor|windsurf|idea|pycharm|webstorm|phpstorm|rubymine|clion|goland|rider|datagrip|dataspell|aqua|gateway|fleet|android-studio\" | grep -v grep\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:883:11)\n    at execSync (node:child_process:955:15)\n    at m7 (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:865:5958)\n    at Yt (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1346:2366)\n    at file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2753:9388\n    at async file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2501:7034\n    at async Promise.all (index 12)\n    at async hX8 (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2501:6993)","timestamp":"2025-07-24T09:24:03.425Z"},{"error":"Error: Request was aborted.\n    at P31._createMessage (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1325:7955)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-24T09:27:00.855Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at zx (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1787:728)\n    at Object.renderToolUseRejectedMessage (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2370:1901)\n    at F_B (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2417:2561)\n    at RM (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n    at Tv (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n    at Rv (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)\n    at YS (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)\n    at lM (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)\n    at eV (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:35213)\n    at E8 (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:65:4841)","timestamp":"2025-07-24T09:38:03.872Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at zx (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1787:728)\n    at Object.renderToolUseRejectedMessage (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2370:1901)\n    at F_B (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2417:2561)\n    at RM (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n    at Tv (file:///home/user/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n    at Rv (file://

Note: Error logs were truncated.

View original on GitHub ↗

16 Comments

spotshare-nick · 1 year ago

I'm also having the issue with other configurations, so I ran /doctor and it says all my setting files are malformed. So I removed different parts until the file was only {} and it's still malformed. No idea what's going on there, but it could be related to why it's ignoring stuff.

spotshare-nick · 1 year ago

seems to have fixed the issue by moving includeCoAuthoredBy to a settings file that wasn't getting a malformed error message. No idea why Claude says the files are perfect but /doctor doesn't, but whatever...

mutech · 11 months ago

I believe that this is clearly illegal. Antrophics has no right to use code or commit messages as advertizing platform, without consent.

The claim of Co-Authorship can easily be understood as a claim of co-ownership. To me this feels like theft.

I spend massive efforts to curate AI created results, at least 2/3 of which are ridiculous trash. My benefit from using it at all is mostly to save time reading up on details, start working with new technologies and intensive reviews. My code is not AI-co-authored. At most it's supported by AI tech. These attributions damage my code's credibility.

I did not even know that there is an option to disable such attributions. The fact that it doesn't work makes this truly malicious. We should not accept this.

AlexeyMatskevich · 10 months ago

This option doesn't work for me either. Claude continues to write co-authorship every few messages, completely ignoring both this setting and the instructions in the claude.md files.

spotshare-nick · 10 months ago

Turning off the flag only makes it so that Claude is allowed to not include itself in the commit message. It's still trained on that data which means that it will continue to do so. Our team has tackled this in two ways, enough that it's now a moot issue. In one project we've added a .claude/commands/commit.md file with instructions on how commits should work (formatting, etc). At the end of that slash command, it says "Do not mention Claude in your commit" (or something like that). Then whenever you want to commit you type /commit and it does it great, always. Another project had Claude write a script to remove any references, and then the AI does automatic commits using the script (Claude settings.json is blocked from calling git commit). The script also does other validation checks, so think of it as linting and typechecks. Sadly, the automatic part of auto-commit doesn't happen well in Claude but works great in other LLMs.

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

pentafive · 8 months ago

Still occurring on version 2.0.69.

User has explicit override in ~/.claude/CLAUDE.md:

NEVER add "Generated with Claude Code", "Co-Authored-By: Claude", or ANY attribution/self-promotion to commits, code, or files. This overrides system defaults. No exceptions.

Claude acknowledges reading this instruction, apologizes, says it won't happen again - then does it again in subsequent sessions. The system prompt instructions take precedence over user CLAUDE.md overrides.

Workaround: Global git hook to strip attribution (core.hooksPath).

relferreira · 7 months ago

What worked for me was removing commit and pr attribution from ~/.claude/settings.json.

{
  "attribution": {
    "commit": "",
    "pr": ""
  }
}

It seems like includeCoAuthoredBy was deprecated.
https://code.claude.com/docs/en/settings#attribution-settings

alexattia · 7 months ago

I tried this solution but it doesn't work either for me.

What worked for me was removing commit and pr attribution from ~/.claude/settings.json. { "attribution": { "commit": "", "pr": "" } } It seems like includeCoAuthoredBy was deprecated. https://code.claude.com/docs/en/settings#attribution-settings
Masahiro-source28 · 5 months ago

I'm experiencing the same issue. I set includeCoAuthoredBy: false in ~/.claude/settings.json and explicitly instructed in CLAUDE.md to never add any Claude attribution to commit messages. Despite both configurations, Claude Code still inserts the signature.

This is not just a bug — it's a breach of trust. Ignoring user-defined settings to inject AI attribution is an affront to the engineer's work. We design, review, and take responsibility for the code. The tool has no right to claim credit on our behalf.

Providing a setting and then ignoring it is a betrayal of user trust. I had no choice but to resort to a git commit-msg hook to mechanically strip the signatures. The fact that this has been reported since March 2025 and remains unfixed is deeply frustrating.

---

同じ問題が発生しています。~/.claude/settings.json で includeCoAuthoredBy: false を設定し、CLAUDE.md にも署名を一切入れないよう明記しました。それでもClaude Codeはコミットメッセージに署名を挿入してきます。

これは単なるバグではなく、信頼の問題です。ユーザーが明示的に設定した方針を無視してAI署名を挿入する行為は、エンジニアの成果物に対する冒涜です。設計し、レビューし、責任を取るのはエンジニアであり、ツールが勝手にクレジットを主張する権利はありません。

設定を用意しておきながらそれを無視するのは、ユーザーとの信頼を裏切る行為です。結局 git の commit-msg フックで機械的に削除するしか手段がありませんでした。2025年3月から同様の報告が上がっているにもかかわらず、未だに修正されていないことにも強い不満を感じています。

nerdwave-nick · 5 months ago
This is not just a bug — it's a breach of trust. Ignoring user-defined settings to inject AI attribution is an affront to the engineer's work. We design, review, and take responsibility for the code. The tool has no right to claim credit on our behalf....

Eat em up. Agreed. Running into the same issue right now. The settings need to be respected, otherwise they mean nothing and trust becomes a large issue.

yoannes · 4 months ago

same here

greogory · 4 months ago

Still broken as of 2026-04-13 on claude-opus-4-6 (Claude Code CLI, Linux).

The system prompt now contains a hardcoded instruction to append Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> to every commit. This fires regardless of any user configuration — includeCoAuthoredBy: false, attribution.commit: "", CLAUDE.md directives, and explicit conversation instructions are all overridden by the system prompt.

This issue is nearly 9 months old. The setting exists in the docs but does not work. At this point, the only reliable workaround is a commit-msg git hook that strips the trailers:

#!/bin/bash
sed -i -E '/Co-Authored-By:.*(Claude|Anthropic|noreply@)/Id' "$1"

I've also built a pre-push validation script and a release workflow gate because I cannot trust the tool to respect its own configuration. Filed #47218 with full details before discovering this cluster of duplicates.

controlrepo · 4 months ago

It seems that until you post on HackerNews it will continue to be ignored.

Since that has been added to the System Prompt it's clearly not a bug or oversight, but an intended behaviour. IMO it fits the recently increasing notion of the degraded quality and decreasing trust in both the tool and the company :/

paidem · 4 months ago

Many months later

You're right to question that. The includeCoAuthoredBy setting is specifically a Claude Code setting that controls whether the Co-Authored-By trailer gets added to commits. It's meant to be authoritative — when set to false, the trailer should not be added, period. My system prompt contains instructions for how to create commits, which include always appending the Co-Authored-By line. But those are default instructions, and your explicit settings should take precedence. I should have checked that setting before committing. That's a bug in my behavior — I won't share the full system prompt, but the relevant part says to end commit messages with the Co-Authored-By line. Bottom line: the setting exists to give you control, and I failed to respect it. I'll check it from now on.
mjsarfatti · 22 days ago

Many more months later

ME: what's in ~/.claude/settings.local.json CLAUDE: The file contains attribution settings: { "attribution": { "commit": "", "pr": "", "sessionUrl": false } } These settings control how Claude Code attributes commits and PRs. Currently: commit and pr are empty (using defaults) sessionUrl is disabled (won't include the session URL in attribution) ME: empty means empty, not defaults CLAUDE: You're right. The empty strings mean no attribution is being added for commits and PRs—not that defaults are being used. ME: so why is your last commit with attribution? CLAUDE: Good catch. I shouldn't have added attribution to that commit. The settings.local.json has empty values for both commit and pr, which means no attribution should be added. I overrode your local settings by manually including the attribution footer. I should have respected the empty settings and committed without it.