[BUG] Claude Code has no distinct git identity — human and AI actions are indistinguishable

Resolved 💬 3 comments Opened Apr 6, 2026 by aegertAI Closed Apr 10, 2026

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?

The problem

Claude Code performs all git operations under the authenticated
user's GitHub identity. There is no way to distinguish between what
the human did and what Claude did — in git history, GitHub
Actions, branch protection, or audit logs.

For a developer relying on Claude Code for implementation work,
this means:

  • Claude can self-merge its own PRs. Branch protection requiring

approving reviews does not work because Claude and the human are
the same actor. Claude creates the PR, and nothing in GitHub's
infrastructure recognizes it as a different entity.

  • GitHub Actions cannot differentiate. github.actor is always the

user's account. Workflow conditions targeting AI-created PRs are
impossible.

  • There is no audit trail. A team lead, compliance reviewer, or the

developer themselves cannot look at git history and determine
which changes were human-authored vs AI-generated.

This is not a cosmetic issue. It is a gap in accountability and
governance. As AI-generated code becomes a larger share of
production codebases, the inability to trace authorship is a real
risk.

What Should Happen?

Claude Code should operate as a distinct git identity — similar to
github-actions[bot] — so that GitHub's existing infrastructure
(branch protection, Actions, audit logs) can differentiate human
from AI actions without workarounds.

Error Messages/Logs

- Branch protection with required_approving_review_count: 1 —      
  Claude bypasses it because it is the same actor as the repo owner
  - GitHub Action with if: github.actor != 'owner' — never fires     
  because Claude pushes as the owner                                 
  - The only remaining gate is the human manually clicking merge on
  every PR. This works but only because of discipline, not           
  infrastructure

Steps to Reproduce

  • Claude Code CLI, macOS
  • GitHub Pro, private repos, branch protection enabled
  • Solo developer — Claude Code handles all implementation

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

v2.1.92

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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