Feature: Bot identity for git operations (separate from user account)
Resolved 💬 2 comments Opened Apr 6, 2026 by aegertAI Closed Apr 6, 2026
Problem
Claude Code pushes commits and creates PRs using the user's GitHub token, so github.actor is always the user's account. There is no way to distinguish Claude's git actions from the user's own actions.
This breaks several workflows for solo developers:
- Branch protection —
required_approving_review_count: 1cannot differentiate Claude opening a PR from the user opening one. Both show as the same actor. - GitHub Actions conditions —
if: github.actor != 'myusername'intended to trigger only on Claude's PRs never fires, because Claude pushes as the user. - Audit trail — git log and GitHub activity show the same author for human and AI commits. No way to filter or audit AI-generated changes.
Proposed Solution
Claude Code should support pushing as a bot identity (e.g., claude-code[bot] or a configurable service account), similar to how github-actions[bot] operates. This would allow:
- Branch protection rules that differentiate human vs. AI
- GitHub Actions workflows that conditionally run based on actor
- Clean audit trail for AI-generated code
- Future compliance/governance requirements around AI authorship
Current Workaround
Auto-approve all PRs unconditionally and rely on the merge button as the sole human gate. This works but loses the ability to have different workflows for human vs. AI PRs.
Environment
- Claude Code CLI on macOS
- GitHub Pro (private repos with branch protection)
- Solo developer workflow where Claude is the entire dev team
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗