[BUG] Plan Mode should support writing a plan artifact file without leaving Plan Mode
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?
When I use Plan Mode, I want the output of planning to be a real artifact file in the current folder or one of its subfolders, such as a markdown plan document that can be reviewed, versioned, or handed off to another model or AI.
Right now, Plan Mode appears to treat the plan as an internal/proposed plan rather than as a file artifact that can be written while still remaining in Plan Mode.
This creates a gap in the workflow:
- I can plan in Plan Mode
- but I cannot reliably persist the plan itself as the deliverable without leaving Plan Mode
- once I leave Plan Mode, the written file may no longer be the exact planning artifact I wanted preserved
That makes Plan Mode weaker for document-first workflows where the plan file itself is the output.
What Should Happen?
Plan Mode should support a workflow where Claude can:
- inspect the repo in read-only fashion
- synthesize a plan
- write exactly one plan artifact file in the current directory or one of its subdirectories
- stop after writing that artifact
- remain in Plan Mode for the rest of the repository
In other words, Plan Mode should allow creation of a single designated planning artifact without switching into general implementation mode.
This should make it possible to produce a handoff document such as:
- plans/implementation-plan.md
- docs/migration-plan.md
- notes/refactor-plan.md
without beginning execution of the plan itself.
Error Messages/Logs
There is usually no explicit error message.
The problem is behavioral and semantic:
- Plan Mode treats the plan as something to approve for later execution
- the plan artifact itself is not treated as the planning output
- leaving Plan Mode in order to write the file can produce an inferior or drifted artifact compared with the plan created during planning
Steps to Reproduce
- Open a project in Claude Code.
- Enter Plan Mode.
- Ask Claude to create a planning document file in the current folder or one of its subfolders, and make clear that the file itself is the deliverable.
- Also specify that Claude should not implement the plan, only write the plan artifact.
Observe that Plan Mode treats the result as an internal/proposed plan and pushes toward an approval/execution transition instead of cleanly supporting "write the plan artifact and stop while remaining in Plan Mode."
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.77
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
This matters because, in some workflows, the plan file is the main output of planning.
The artifact needs to exist on disk so it can be:
- reviewed by a human
- committed to version control
- handed off to another model or AI
- preserved independently of chat/session state
If the plan file can only be written after leaving Plan Mode, the written artifact may no longer be a faithful representation of the plan produced during planning. In practice, that can make the saved plan lower-quality than the plan that existed conceptually inside Plan Mode.
This issue is especially important when using a workflow where planning quality matters and the persisted plan is intended to be consumed by another tool, model, or collaborator.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗