Agent commits and pushes changes without waiting for user approval
Resolved 💬 3 comments Opened Mar 3, 2026 by ekandreas Closed Mar 7, 2026
Description
When asked to make code changes, Claude Code often commits and pushes without showing the changes first and waiting for user approval. This happens even when:
- The project has explicit guidelines (in CLAUDE.md) about never working directly on the default branch
- The user has not asked for a commit/push
- The changes should be reviewed before being committed
Steps to reproduce
- Ask Claude Code to make a config change (e.g. change a value in a config file)
- User says "yes" to the change itself
- Claude Code immediately commits, pushes, and sometimes even creates a PR — all in one chain without stopping for review
Expected behavior
Claude Code should:
- Make the file change
- Show the change and wait for explicit approval before committing
- Only commit after user says OK
- Only push after user says OK
Actual behavior
Claude Code chains git add && git commit && git push in a single command, giving the user no opportunity to review before the changes leave their machine. When told to stop, it sometimes continues with additional unwanted actions (e.g. reverting when not asked to).
Additional context
This is particularly problematic in workflows where:
- Code review is required before merging
- The team never commits directly to the default branch
- Release notes and other artifacts need human review before being finalized
The agent should treat commit and push as high-stakes actions that always require explicit user confirmation, similar to how destructive git operations are handled.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗