[BUG] Plan file viewer on Windows kills parent terminal
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 in plan mode in the CLI and I chose to open the plan claude code created in Notepad. When Notepad opened the primary powershell terminal closed.
Opening Claude Code CLI again and asking what happened resulted in the following:
That sounds like a bug in Claude Code's plan file viewer on Windows. When the plan mode system opened the file in Notepad, it likely spawned the process in a way that caused the parent terminal/shell to exit — possibly because the process was launched synchronously or the shell session was tied to the child process.
What Should Happen?
Claude Code CLI should not kill the primary terminal when asked to open a plan in another tool.
Error Messages/Logs
Steps to Reproduce
- Open Claude Code in a Powershell
- Ask Claude to plan a multi-step refactor of 3 repos
- Claude creates a plan and presents it for approval
- Select the option to open the plan file in Notepad (to view it externally)
- Observe that the Claude Code terminal session closes when Notepad opens
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
v2.1.45
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗