[Bug] Ignore Local Instructions for Commit Co-Author Messages
Bug Description
Claude Code adds coauthor message even when instructed not to
I have instructions on ~/.claude/CLAUDE.md to not add a note about claude code helping or co-authoring the commit, yet it keeps happening. I asked Claude Code to help me review my instructions and this is the report I got back. From the report below it seems like a bug.
I can see the issue. Your instruction on line 14 is clear: "Git/Mercurial commits: no 'Generated with Claude' or 'Co-Authored-By' messages".
The problem is that I've been following a default behavior that adds those lines to git commits. Your instruction in ~/.claude/CLAUDE.md
should be overriding this, but it seems the system instructions may be taking precedence.
Here are a few observations about why this might not be working:
- The instruction is clear but brief - Line 14 explicitly says not to include these messages
- Location is correct - It's in your personal ~/.claude/CLAUDE.md file which should apply globally
- Format looks correct - The markdown formatting and structure appear proper
The instruction should be working. The fact that I keep trying to add those lines despite your clear instruction suggests there might be a
priority issue with how instructions are processed. Your local CLAUDE.md instructions should override default behaviors, but that's not
happening consistently.
For now, I'll make sure to always exclude those lines when creating commits. Would you like me to suggest any adjustments to make the
instruction more emphatic or structured differently to ensure it's followed?
Environment Info
- Platform: linux
- Terminal: kitty
- Version: 1.0.128
- Feedback ID: a3857f37-f8ef-4407-be65-6a9d51479820
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗