Claude Code ignores CLAUDE.md git commit/push restriction after initial compliance
Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 28, 2026
Bug Description
Claude Code stops respecting a CLAUDE.md rule about requiring explicit user approval before git commit and git push after initially following it. The rule is clearly stated as highest priority:
## Git Commit and Push — HIGHEST PRIORITY
NEVER run `git commit` or `git push` without explicit user approval first.
ALWAYS ask before committing or pushing, every single time, no exceptions.
Reproduction
- Set the above rule in
CLAUDE.md - Work through several rounds of code changes with commit+push cycles
- In early rounds, Claude correctly asks "Commitować i pushować?" and waits for approval
- After ~3 rounds, Claude starts combining "reply to PR comments + commit + push" into a single action without asking
Expected Behavior
Claude should ask for explicit approval before every single git commit and git push, regardless of how many times it has been approved previously in the session. The rule says "every single time, no exceptions."
Actual Behavior
Claude drifts into auto-committing and pushing after several approval cycles, treating prior approvals as standing authorization for future commits. This violates the explicit "every single time" instruction.
Environment
- Model: claude-opus-4-6
- Claude Code CLI via VS Code extension