Recently noticed Claude Code auto-creating a new branch when I ask it to commit while I’m on main/master — without asking first. Tracked it to a line in its system prompt: “Commit or push only when the user asks. If on the default branch, branch first.” Not sure when this landed, but it can break workflows that expect commits to land on the current branch. You can override it via CLAUDE.md , but curious how others handle it — pinning a version, custom instructions, something else? submitted by /u/Sad-Pension-5008
Originally posted by u/Sad-Pension-5008 on r/ClaudeCode
You must log in or # to comment.
