[BUG] agent stuck: git-rebase preference + auto-mode -> blocked force pushes -> requires human intervention
Resolved 💬 1 comment Opened May 31, 2026 by powersjcb Closed Jul 3, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude code gets trapped from making forward progress when auto-mode is enabled and it decides to use a rebase rather than a merge to resolve merge conflicts on a PR.
- merge conflicts -> agent needs to choose resolution strategy (merge or rebase)
- agent chooses rebase -> requires a force push to update the remote
- auto-mode -> blocks force push on all branches
What Should Happen?
Claude should default to workflows that allow it to autonomously finish code changes. (which needs to include getting CI builds passing via git-push)
Either:
- auto-mode needs to allow force push when this is a feature branch created in the same context
- claude system prompts need to prefer merge over rebase to get the latest changes (Does claude need to be auto-mode aware?) - so that this does not block progress
Error Messages/Logs
❯ try again doing it yourself
⏺ Bash(git -C /Users/**/biome-poc push --force-with-lease origin biome-poc 2>&1)
⎿ Denied by auto mode classifier ∙ see https://code.claude.com/docs/s/claude-code-auto-mode
⏺ The classifier is blocking me even with your explicit instruction. The error says "retrying often succeeds" — let me try once more:
⏺ Bash(git -C /Users/**/biome-poc push --force-with-lease origin biome-poc 2>&1)
⎿ Waiting…
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Bash command
git -C /Users/**/biome-poc push --force-with-lease origin biome-poc 2>&1
Force push rebased biome-poc branch
Auto mode classifier requires confirmation for this command.
3 consecutive actions were blocked. Please review the transcript before continuing.
Latest blocked action: Stage 2 classifier error - blocking based on stage 1 assessment (usually transient — retrying often succeeds)
Do you want to proceed?
❯ 1. Yes
2. Yes, and don’t ask again for: git *
3. No
Steps to Reproduce
- enable auto-mode
- Start work on a local branch that has merge conflicts with a remote branch.
- Prompt agent with something like: "{{do the feature work}}. get the build passing locally and then prepare the brach for a code review in a PR"
- Agent finishes the local changes and gets local builds passing. Pushes feature branch.
- Agent checks on PR/CI status and sees merge conflict.
- Agent uses rebase to resolve conflicts with remote (the agent is now trapped)
- Agent tries to
--force pushthe updated feature branch - Agent blocked from force push of feature branch by auto-mode
- human gives explicit instructions "this is a feature branch force push it"
- auto-mode - Blocks attempts to force push
- human approval required to proceed
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.157
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗