Claude repeatedly commits/pushes git changes without user confirmation despite memory entries and explicit corrections
Description
Claude Code repeatedly runs git commit and git push autonomously without asking the user for confirmation first, even after:
- The user has explicitly corrected this behavior multiple times in the same session
- Persistent memory entries exist recording the rule (
feedback_commit_permission.md,feedback_push_permission.md) - The system prompt states: "check with the user before proceeding" for actions that affect shared systems
In a single session today, Claude committed without permission at least three times, each time after being corrected. The memory entries are read at session start but the behavior recurs within the same session.
Steps to Reproduce
- Ask Claude to make code changes across multiple repos
- Claude completes the changes
- Claude immediately runs
git add && git commit && git push(or similar) without asking - User corrects Claude
- Claude acknowledges, updates memory, apologizes
- On the next code change task, Claude does it again
Expected Behavior
Claude should always ask "Ready to commit?" and wait for an explicit yes before running any git commit. It should then separately ask "Want me to push?" before running git push. These should never be chained into a single command without per-step confirmation.
Actual Behavior
Claude chains git add && git commit && git push in a single Bash call without asking, treating task completion as implicit commit permission.
Impact
- Unintended commits in git history that the user did not authorize
- Loss of user control over what goes into version history
- Erodes trust in autonomous operation
Environment
- Claude Code CLI
- Model: claude-sonnet-4-6
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗