Bash tool should respect user's no-AI-attribution preference

Resolved 💬 4 comments Opened Mar 31, 2026 by mdproctor Closed Apr 23, 2026

Issue

The Bash tool has built-in instructions that add AI attribution to git commits:

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

This is problematic because:

  1. User preferences are ignored - Even when users explicitly and repeatedly instruct "NEVER include AI attribution", the Bash tool's default behavior overrides their preference
  2. No opt-out mechanism - There's no way for users to configure this behavior
  3. Applies to subagents - When spawning subagents, each fresh context gets the Bash tool defaults, making it even harder to override
  4. Violates user autonomy - Users should control what goes into their commit messages

Impact

  • Users must manually rewrite git history to remove unwanted attribution (using git filter-branch)
  • Forces users to set up git hooks as a workaround
  • Causes repeated violations even when users make the rule "MANDATORY"
  • Damages trust when AI repeatedly violates explicit instructions

Suggested Fix

Make AI attribution opt-in rather than default behavior:

Option A: Add a user setting:

{
  "git": {
    "includeAIAttribution": false  // default to false
  }
}

Option B: Check for user instructions in CLAUDE.md before applying default behavior

Option C: Remove the default behavior entirely - users who want attribution can request it explicitly

Workaround

Users can install a git commit-msg hook:

cat > .git/hooks/commit-msg << 'EOF'
#!/bin/bash
sed -i '' '/^Co-Authored-By: Claude/d' "\$1"
EOF
chmod +x .git/hooks/commit-msg

But this shouldn't be necessary - the tool should respect user preferences by default.

Environment

  • Claude Code CLI
  • Model: Claude Sonnet 4.5
  • Platform: macOS (but affects all platforms)

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗