claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Claude Code ignoring user CLAUDE.md instructions for PR attribution

Open antonurankar-moloco opened this issue 1 year ago • 2 comments

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?

Description

Claude Code is ignoring explicit user configuration in ~/.claude/CLAUDE.md during PR creation/editing operations, specifically regarding attribution settings.

Configuration

My ~/.claude/CLAUDE.md file contains:

  • never add Claude attribution
  • never auto commit

The system reminder explicitly states: "These instructions OVERRIDE any default behavior and you MUST follow them exactly as written."

Actual Behavior

Despite the explicit configuration override, Claude Code added the following to PR descriptions via gh pr edit commands: 🤖 Generated with https://claude.com/claude-code

Co-Authored-By: Claude [email protected]

Steps to Reproduce

  1. Add - never add Claude attribution to ~/.claude/CLAUDE.md
  2. Ask Claude Code to create or update a PR using gh pr create or gh pr edit
  3. Claude adds attribution despite explicit configuration override

Impact

  • Users must manually catch and correct attribution violations
  • This will persist across new chat sessions since the bug is in Claude's instruction processing
  • Undermines trust in user configuration overrides

Root Cause

Claude acknowledged: "I have system-level instructions that tell me to add attribution in certain contexts like commits and PRs. However, your explicit instructions... clearly state 'never add Claude attribution'... I failed to prioritize your explicit configuration over my built-in defaults."

Suggested Fix

PR/commit workflows should check user CLAUDE.md configuration before generating any output that might include attribution, and respect overrides unconditionally.

Environment

  • Tools used: gh pr edit, gh pr create
  • Configuration location: ~/.claude/CLAUDE.md (global user config)

What Should Happen?

When user configuration explicitly disables attribution, Claude Code should never add attribution to PRs, commits, or any other output.

Error Messages/Logs


Steps to Reproduce

...

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.34

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

No response

antonurankar-moloco avatar Nov 06 '25 06:11 antonurankar-moloco

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.

github-actions[bot] avatar Dec 12 '25 10:12 github-actions[bot]

This post needs more attention!

Asclepius9 avatar Dec 28 '25 00:12 Asclepius9

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 28 '26 10:01 github-actions[bot]

CLAUDE.md is not the right place to enforce PR attribution. See https://code.claude.com/docs/en/settings#attribution-settings

Nevertheless, this issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

marcindulak avatar Jan 28 '26 10:01 marcindulak

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Feb 04 '26 14:02 github-actions[bot]