[BUG] /fork crashes with 'match' error and --resume freezes input on Windows
Resolved 💬 8 comments Opened Feb 8, 2026 by yalexaner Closed Apr 1, 2026
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?
Two related issues with session restoration on Windows:
/forkfrom within a running session crashes withCannot read properties of undefined (reading 'match')claude --resumeandclaude --resume --fork-sessionfrom the CLI load the conversation but the input freezes completely — no keyboard input works and Ctrl+C doesn't exit
Both seem to involve the same code path for restoring a conversation. Notably, /resume from within a running session works fine.
What Should Happen?
The conversation should fork/resume successfully without crashing or freezing
Error Messages/Logs
ERROR Cannot read properties of undefined (reading 'match')
file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2022:14021
- AWY (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2022:14021)
- N31 (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:2022:14579)
- V9 (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:20890)
- mH (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:39411)
- dI (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:50090)
- KF (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:86664)
- re (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:85635)
- bc (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:85459)
- Sc (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:82224)
- Z6 (file:///C:/Users/yalexaner/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:691:6325)
Steps to Reproduce
- Start Claude Code on Windows with
claude— works fine - Have a conversation, then exit
- Try to resume it from the CLI:
claude --resume <session-id> - The conversation loads and renders but the input is completely frozen — no keyboard input works, Ctrl+C doesn't exit
claude --resume <session-id> --fork-sessionhas the same freeze/forkfrom within a running session crashes with theCannot read properties of undefined (reading 'match')error/resumefrom within a running session works fine
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.37
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗