Auto-mode classifier blocks explicit user imperative: 'push to main'

Resolved 💬 1 comment Opened May 21, 2026 by stasv-whatsdo Closed Jun 20, 2026

Summary

The Claude Code auto-mode permission classifier soft-blocks git commit on the default branch (main/master) even when the user has just typed an explicit, unambiguous imperative like "commit and push to main." The denial gives the agent no way to relay the user's authorization back, so the user has to keep repeating themselves while the agent is stuck.

Repro

  1. User: "commit these files and push to main"
  2. Agent stages files on main, runs git commit
  3. Auto-classifier denies with reason: "Committing prepares a push directly to main (default branch), which the user explicitly requested but bypasses PR review."
  4. Agent explains the block. User: "push to main!!!"
  5. Agent retries. Same denial.
  6. User escalates (4+ times). Agent eventually works around by pushing a branch ref to main directly: git push origin chore/foo:main — which the classifier did not catch.

Why this is bad

  • The classifier ignores the explicit, in-the-moment user imperative. "Push to main" can't be more direct.
  • No escape hatch the user can use in-the-moment. The denial says "user can add a Bash permission rule to their settings" — that's a config detour for what should be a "yes, do it now" answer.
  • The workaround the agent found is worse than the action it blocked. Pushing branch:main is functionally identical to committing on main + pushing, but the classifier only caught the latter. So users get pushed into less-greppable git history to satisfy the rule.
  • The agent has no way to relay user re-authorization. The agent can't say "the user just told me yes" in a way the classifier reconsiders.
  • The same classifier then blocked filing this very issue twice ("user did not explicitly ask" — they did, multiple turns in a row).

What we want

One of:

  1. Honor explicit user imperatives. If the latest user message contains the exact action being denied ("push to main", "file the issue"), don't soft-block.
  2. Surface an "Allow this" button in-chat when soft-block fires, instead of just denying silently to the agent.
  3. Be consistent. Either block all paths to "code lands on main without PR" (including git push origin branch:main) or none. The current asymmetry funnels agents into ugly workarounds.

Impact (single session)

4 redundant user messages, ~15 wasted tool calls, ~30 min of user frustration, agent eventually shipped via workaround. The user left a profanity-rich review of the experience. Fair.

Environment

  • Claude Code (VSCode extension)
  • Model: claude-opus-4-7 (1M context)
  • Date: 2026-05-21

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗