[BUG] System instructions enforces push workflow by default, contradicting user control principle

Resolved 💬 9 comments Opened Apr 18, 2026 by bianca-git Closed Jun 26, 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?

The default stop hook (~/.claude/stop-hook-git-check.sh) enforces checking for unpushed commits on every session exit. This behavior is applied by default with no built-in configuration option to disable it, forcing users to manually edit system files to opt out.

This contradicts the principle that developers should maintain explicit control over when code is pushed to the remote. It's especially problematic for workflows where developers intentionally hold local commits before pushing (e.g., for batching, review cycles, or controlled deployments).

What Should Happen?

The stop hook should either:

  1. Not check for unpushed commits by default, OR
  2. Provide a settings.json configuration flag to disable this check (e.g., stopHookCheckUnpushed: false)

Users should not need to manually edit system files to change this default behavior.

Error Messages/Logs

Steps to Reproduce

  1. Instruct Claude Code: "Never push to GitHub without asking"
  2. Work on code changes across multiple commits
  3. End the session or reach a natural stopping point
  4. Observe: Claude has pushed commits to the remote without asking permission

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude 1.3109.0 (35cbf6) 2026-04-16T20:32:01.000Z

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Issue frequency: Intermittent but repeated — happens randomly across sessions despite consistent user instructions and settings configuration

User expectation: Developer maintains explicit control over pushing at all times. Local commits are fine and expected. Pushes require explicit user request.

Impact: User cannot trust Claude Code to respect their explicit instructions about pushing, requiring manual verification of uncommitted changes before ending sessions.

Note: The stop hook warning about unpushed commits is a symptom of this deeper issue — it assumes pushing is expected/default behavior, when it should be explicitly user-controlled.

View original on GitHub ↗

This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗