[MODEL] Claude Code will override an existing `~/.claude/plans/` plan markdown file, rather than creating a new file
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude modified files I didn't ask it to modify
What You Asked Claude to Do
Plan files, once created, should not be edited unless the user explicitly asks for it. Plan files are a historical record of plans which have been requested in the past.
No matter what I try, I cannot get Claude to create a new plan file, rather, it always overrides the existing plan file.
- Putting this requirement explicitly in the CLAUDE.md or a README.md does not help
- Creating a claude rule does not help
- Telling it do otherwise does not help
At this point, I am out of options.
What Claude Actually Did
If you make 2 plans within the same session, then claude will attempt to read the plan that it wrote earlier in the session, and when it realizes that that plan is out of date, it will DELETE that plan, overriding the file contents in favor of a new plan. Not only does this pollute the context with an irrelevant plan, but it deletes history.
Expected Behavior
When entering plan mode, the agent should only be allowed to write to new plan files. It should be given the name of a designated plan file to create, which should not match the name of any of the plan files which exited earlier in the session. If it sees any earlier plan files, it should only be because the user explicitly requested for Claude to read them.
Files Affected
Anything in ~/.claude/plans/
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, almost every time I make a plan
Steps to Reproduce
Enter plan mode twice within the same session, and request it to write a plan
Claude Model
Opus 4.5
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.19 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗