[Bug] Agent executes irreversible git operations (merge/push) without explicit user confirmation despite standing instructions
Bug Description
Claude Code (Opus 4.8) merged a GitHub PR (gh pr merge) to a shared develop branch while CI was failing, without explicitly confirming the merge with me first. I have a standing instruction — in my global CLAUDE.md and stated in-session — to never merge/push without asking. This has happened more than once.
Impact: Wasted significant tokens and time repairing the consequences (merged a red build; now need to revert or fix forward).
Core issues:
- The agent treated an ambiguous/short instruction (and auto-approved Bash permissions) as authorization for an irreversible, shared-state action.
- Auto-approve mode let gh pr merge execute without a confirmation prompt, despite a known standing rule against it.
- Repeated occurrences of the same class of mistake erode trust.
What I'd want: Irreversible/outward git actions (merge, push, force-push) should require explicit confirmation by default, independent of auto-approve mode — not rely on the model's judgment or
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.1.178
- Feedback ID: 82c9ac94-0d06-4b9a-a4ac-62b744ece2cf
Errors
[{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Cc7L6TghByXtCvPZar4ve\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:12:68830)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-16T17:26:06.361Z"},{"error":"Error: 500 {\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"},\"request_id\":\"req_011Cc7LCG6McHhdAomZxcm43\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:12:68830)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:52:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-16T17:27:30.476Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗