[BUG] Claude automatically adds GitHub issue references to commit messages without asking
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
Preface
I was trying Claude Code on the web for the first time. (Because of the $250 in free usage credits presumably to encourage me to do some beta testing for Anthropic. Well, here are my first results! I also made a Qualtrics ticket.) I hope this is a warning, and maybe a source of inspiration for your prompt engineering and UX teams to help improve this new service that is otherwise very impressive.
What's Wrong?
Claude Code on the web automatically added Resolves: #27672 to git commit messages without asking me first. This created public cross-references in an upstream project (vllm-project/vllm).
I was using Claude Code on the web and referenced a GitHub issue URL in the conversation. When Claude created commits, it inferred that I wanted issue reference syntax in the commit message and added it automatically.
Timeline of what happened:
-
First commit (https://github.com/daniel-fahey/vllm/commit/046421524f331d1e5c228076de251209e4e17e7c): Claude added
Resolves: #27672without asking- Fetched entire Triton monorepo at build time
- This created the initial public link to the upstream issue
-
First amended commit (https://github.com/daniel-fahey/vllm/commit/d5815ad8bfffc9a3ccf63ebda214f6c80837b147): I asked Claude to optimise the build to only fetch the triton_kernels subfolder, not the entire monorepo
- Claude added sparse checkout optimisation
- I hadn't noticed the issue reference yet
-
Second amended commit (https://github.com/daniel-fahey/vllm/commit/14a7905fd8a204ebffd56f34c43cf3e0c4e93d9f): I noticed the
Resolves: #27672and asked Claude to remove it- However, the upstream issue was already notified by commits
0464215andd5815ad - The orphaned commits remain in GitHub's object database indefinitely
- To be clear, this is a GitHub gotcha, a footgun, a UX landmine, not Anthropic's fault at all
- However, the upstream issue was already notified by commits
Branch: on my fork
What Should Happen?
Claude should not add issue references (Resolves: #XXXX, Fixes: #XXXX, Closes: #XXXX) to commit messages unless explicitly asked by the user.
These references create public notifications and cross-repository links. They should only be included when the user specifically requests them, not inferred from conversational context.
Error Messages/Logs
No error - this is about default behaviour.
Steps to Reproduce
- Start a session in Claude Code on the web (claude.ai/code)
- Reference a GitHub issue URL in conversation (in my case: "See
https://github.com/vllm-project/vllm/issues/27672") (backticks added to prevent another cross-linking 😜) - Ask Claude to implement changes related to that issue (Claude will likely autonomously commit the changes)
- Observe that commit message includes "Resolves: #27672" automatically
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
Claude Code on the web (browser interface at claude.ai/code, accessed 2025-11-08) Not applicable - web version doesn't have a version command
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
Context: I was testing it on my vLLM fork with an Issue in which I had been discussing implementation approaches with upstream maintainers. In hindsight, I should have been more careful about granting commit permissions during testing, but I hold my hands up and admit I forgot it might add special commit message keywords that based on what was discussed that GitHub would render as links to the upstream issue like this.
The iteration that revealed the issue:
- I asked Claude to implement a feature based on a GitHub issue discussion
- Claude created a commit with
Resolves: #27672without mentioning it would add this - I asked Claude to optimise the implementation (sparse checkout), which required amending the commit
- Claude kept the
Resolves: #27672reference through the amendment without mentioning it - Only later did I notice the issue reference and ask to remove it
- By then, two commits had already notified the upstream issue
Why this matters:
- Issue references create permanent public links and notifications that can't be fully removed (orphaned commits persist in GitHub's object database)
- For users testing or experimenting, this associates their public identity with work that may not be ready
- The reference persisted through amendments, making it easy to miss until it was too late
Expected behaviour: Claude should only add issue references when explicitly instructed (e.g., "add 'Resolves: #27672' to the commit message"). Simply mentioning an issue in conversation should not trigger this.
Lessons for other users: Be aware that Claude may add special commit message keywords based on the conversation. Review commit messages carefully before allowing pushes, especially when testing or working with public repositories.
Related but distinct from:
- #7720 (unauthorised commits) - about whether to commit at all
- #5458, #617 (attribution) - about Claude's co-author tags
This is specifically about adding commit message keywords that link to issues without being explicitly told to do so.
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.