Crash on worktree session exit leaves terminal in broken state (Windows)
Resolved 💬 2 comments Opened Mar 6, 2026 by jakyle Closed Apr 3, 2026
Description
Claude Code crashes when exiting/wrapping up a worktree session, leaving unreadable/garbled text in the terminal. The terminal appears to be left in raw mode or with incomplete ANSI escape sequences.
Steps to Reproduce
- Start a Claude Code session on Windows
- Use a git worktree flow during the session
- When the session exits (or during worktree cleanup), Claude Code crashes
- Terminal is left with strange unreadable characters
Expected Behavior
Session should exit cleanly, restoring the terminal to its normal state.
Actual Behavior
Claude Code crashes mid-exit, leaving the terminal in a broken state with garbled/unreadable text. Requires closing and reopening the terminal or running Reset-Host to fix.
Environment
- Claude Code version: 2.1.63
- OS: Windows 11 Pro for Workstations (10.0.26200)
- Shell: PowerShell
- Terminal: VS Code integrated terminal
Additional Context
This has happened multiple times, not just once. The crash appears to occur during the worktree cleanup/exit phase.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗