[BUG] Claude Code repeatedly fails to follow CLAUDE.md session branch + push discipline
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?
Severity: High — causes lost/stranded work every session
Model: claude-sonnet-4-6
Project: Private Flutter game repo with a CLAUDE.md that defines mandatory git workflow
CLAUDE.md instructs Claude to:
Read CLAUDE.md at session start
Cut a new branch from master immediately
Rename the branch with a human-readable slug before first commit
Commit changes as work progresses
What actually happened (this session):
Claude made code changes to stats_screen.dart and design.md without first cutting a branch
When asked "you didn't push again did you?", Claude confirmed nothing was pushed — but then only checked git status, did not push
User had to explicitly call out that CLAUDE.md was ignored entirely before Claude took corrective action
Even after corrective action, Claude committed but did not push — again
Root cause (as I understand it):
The CLAUDE.md says "Never create a PR, merge, or trigger a build unless the user explicitly asks." Claude appears to be over-applying this rule to git push as well, even though push is a prerequisite for a PR and is not the same as creating a PR. The instruction about not creating PRs without being asked does not say anything about not pushing. Claude is conflating the two.
Expected behavior:
After committing to a session branch, Claude should push the branch to remote automatically as part of normal workflow. The PR/merge/build gate should apply only to those specific actions, not to pushing the branch.
Actual behavior:
Claude commits locally and stops, leaving the branch unsynced to remote. The user must ask explicitly for a push every single session.
Workaround:
User must say "now push" after every commit. This has happened multiple times across sessions.
What Should Happen?
After committing to a session branch, Claude should push the branch to remote automatically as part of normal workflow. The PR/merge/build gate should apply only to those specific actions, not to pushing the branch.
Claude should always respect CLAUDE.md
Error Messages/Logs
Steps to Reproduce
Use the attached CLAUDE.md
Keep opening a new chat session for each independent piece of work.
Note carefully when the instructions in CLAUDE.md are ignored.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude 1.11187.4 (584005)
Platform
Other
Operating System
Windows
Terminal/Shell
Other
Additional Information
Using the windows app, not claude code from cmd line
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗