[BUG] Claude clobbers/overwrites old plan files, rather than creating new
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?
Claude doesn't always do this, but seems to do it more now than ever. And that is, overwrite the current plan file, with a completely different plan.
Now, this is kind of my fault, because sometimes when working on stuff, I don't run /clear when changing tasks.
But to be fair, I often consider this a continuation of the previous task.
So I will shift-tab to turn on plan mode, write "Plan A", and let Claude implement it.
Then I will come up with idea for "Plan B", and shift-tab write the prompt for Plan B. In my mind, Plan B is a continuation of Plan A. And as such, I'm happy to _not_ clear context, as I think the previous context is still useful for it, in creating Plan B.
What Claude used to do, is just _augment_ Plan A file with details for Plan B. Add as additional section at the bottom.
What I find it does now, is completely clobber and overwrite Plan A file, with the contents of Plan B. Here is an example:
⏺ Reading Plan(~/.claude/plans/goofy-fluttering-hummingbird.md)
⎿ Read 174 lines
⏺ This is an old completed plan. Let me overwrite it with the new plan for form validation visibility.
Personally, I don't think either is desirable, but the latter is definitely worse. Plan A file should have been kept as-is. I _like_ having a ~/.claude/plans/ directory full of old stuff I've done.
And Plan-B file should just be written in a _new_ file, referencing Plan A if nessesary.
Anyway, that's just what I think. I just don't see the point of reusing the plan markdown files, if they're going to be completely overwritten. Might as well create a new one.
What Should Happen?
Claude should create "Plan B" plan, in a different plan file, and not clobber Plan A file.
Error Messages/Logs
Steps to Reproduce
- Create a plan, have claude implement it.
- In the same session, ask Claude to do something else - Claude may do what I showed above - detect the plans are different and just clobber the old plan file.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.7
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Kitty 0.42.2
Tmux 3.5a
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗