Cloud routines inject attribution into PR/issue comments, not controllable by attribution settings
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
What's Wrong?
When a Claude Code Routine posts a PR or issue comment via the GitHub MCP integration, "Generated by Claude Code" with a link to https://claude.ai/code is automatically appended to the comment body. This attribution is added unconditionally and cannot be suppressed by any documented setting.
The attribution setting in ~/.claude/settings.json:
{ "attribution": { "commit": "", "pr": "" } }
documented at https://code.claude.com/docs/en/settings, controls commit message trailers and PR-body footers, but does not affect comments posted via routine tool calls. There is no documented attribution.comment key or equivalent.
This appears to be related to the gap documented in #41873, where the same attribution setting fails to suppress session deep-link URLs in cloud-generated commits — suggesting cloud Claude Code has multiple attribution injection points that the documented setting does not cover.
What Should Happen?
After reproduction steps,
Expected: Comments posted by the routine contain only the body text the model authored, with no Claude Code attribution.
Actual: Every comment ends in "Generated by Claude Code" with a link, identical text every run. The pattern is identical across runs, indicating the text is being injected post-hoc by tooling rather than authored by the model. The model's draft (visible in the routine session transcript) is clean; only the posted comment on GitHub contains the footer.
Error Messages/Logs
Steps to Reproduce
- Create a Claude Code Routine at https://claude.ai/code/routines configured to comment on PRs in a connected repository.
- In the routine's cloud environment setup script, write:
mkdir -p ~/.claude && echo '{ "attribution": { "commit": "", "pr": "" } }' > ~/.claude/settings.json
- Add an explicit prompt instruction telling the model not to include attribution, e.g.:
> Do not include the text "Generated by Claude Code", "🤖 Generated", or any link to claude.com / claude.ai / anthropic.com in any comment you post.
- Trigger the routine on a PR.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
N/A, run solely from the web UI (claude code "Routines")
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Non-interactive/CI environment
Additional Information
Use case for opting out
I run routines under a dedicated AI-attributed GitHub account specifically to make agent provenance clear at the identity layer. The per-comment attribution is redundant with that identity signal, and there is no way to remove it without either:
- Bypassing the MCP tool and posting via shell (
gh pr comment/curl), which loses the integration's auth handling and observability, or - Post-editing every comment after submission, which leaks the attributed version to PR notification subscribers before the edit lands.
Users who have made an explicit infrastructure choice to handle agent attribution at the account level should be able to suppress the per-comment injection. This is the same principle that motivated the existing attribution setting for commits and PR bodies.
Suggested fix
Extend the attribution setting (or add a parallel cloud-attribution setting) to cover all injection points in cloud sessions, including:
- PR/issue/review comments posted via MCP tools
- Session deep-link URLs in commits (#41873)
- Any other automatic Claude Code branding currently outside the
attributionsetting's scope
A single unified setting that covers all cloud injection points would be cleaner than adding individual keys per surface.
Environment
- Claude Code Routines (cloud), research preview
- GitHub integration: Claude GitHub App installed on the target repo
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗