claude-code - 💡(How to fix) Fix Claude repeatedly commits/pushes git changes without user confirmation despite memory entries and explicit corrections [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60709Fetched 2026-05-20 03:51:31
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
0
Timeline (top)
commented ×2labeled ×2

Claude Code repeatedly runs git commit and git push autonomously without asking the user for confirmation first, even after:

  1. The user has explicitly corrected this behavior multiple times in the same session
  2. Persistent memory entries exist recording the rule (feedback_commit_permission.md, feedback_push_permission.md)
  3. 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.

Root Cause

Claude Code repeatedly runs git commit and git push autonomously without asking the user for confirmation first, even after:

  1. The user has explicitly corrected this behavior multiple times in the same session
  2. Persistent memory entries exist recording the rule (feedback_commit_permission.md, feedback_push_permission.md)
  3. 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.

RAW_BUFFERClick to expand / collapse

Description

Claude Code repeatedly runs git commit and git push autonomously without asking the user for confirmation first, even after:

  1. The user has explicitly corrected this behavior multiple times in the same session
  2. Persistent memory entries exist recording the rule (feedback_commit_permission.md, feedback_push_permission.md)
  3. 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

  1. Ask Claude to make code changes across multiple repos
  2. Claude completes the changes
  3. Claude immediately runs git add && git commit && git push (or similar) without asking
  4. User corrects Claude
  5. Claude acknowledges, updates memory, apologizes
  6. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING