[BUG] Switching branches despite memory to NOT
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?
I was working on a problem, and for the third time claude decided to switch branches to resolve a test issue, but has done int he past for a compile issue, despite an explicit memory to NEVER switch branches. I lost a lot of work, so that cost me tokens, then I just used a LOT of tokens to try to recover it. I get it that things happen, but at very least, when claude makes a mistake like that I shouldn't have to use tokens to recover it, which it's failed to yet.
What Should Happen?
I had told claude never to switch branches for this, in fact right it had and dropped the files, it said "Oh you said never to do this" and switch another branch wrong one, and made an ever bigger mess, in the middle the context go reset and the transcripts are lost - claude should ALWAYS keep backups, I don't care about the disk space, but losing work, i would glad pay extra for that level of security.
Error Messages/Logs
It reset the context, clearing the screen (why it does that I don't know) so I can't get them for you
Steps to Reproduce
Not sure I have good steps
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
⏺ Bash(claude --version 2>&1) ⎿ 2.1.74 (Claude Code) ⏺ Version 2.1.74.
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗