[BUG] System instructions enforces push workflow by default, contradicting user control principle
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:
- Not check for unpushed commits by default, OR
- Provide a
settings.jsonconfiguration 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
- Instruct Claude Code: "Never push to GitHub without asking"
- Work on code changes across multiple commits
- End the session or reach a natural stopping point
- 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.
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗