[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:

  1. /fork from within a running session crashes with Cannot read properties of undefined (reading 'match')
  2. claude --resume and claude --resume --fork-session from 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

  1. Start Claude Code on Windows with claude — works fine
  2. Have a conversation, then exit
  3. Try to resume it from the CLI: claude --resume <session-id>
  4. The conversation loads and renders but the input is completely frozen — no keyboard input works, Ctrl+C doesn't exit
  5. claude --resume <session-id> --fork-session has the same freeze
  6. /fork from within a running session crashes with the Cannot read properties of undefined (reading 'match') error
  7. /resume from 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_

View original on GitHub ↗

This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗