[BUG] Ctrl-z crashes claude on windows because ERR_UNKNOWN_SIGNAL

Resolved 💬 3 comments Opened Jul 16, 2025 by shorn Closed Jul 17, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ X] Other: Windows
  • Claude CLI version: 1.0.53 (Claude Code)
  • installed via npm install -g @anthropic-ai/claude-code
  • Operating System: Windows 10
  • Terminal: Jetbrains Intellij IDEA terminal
  • Node.js: node-v22.17.1

Bug Description

Press ctrl+z, claude dies and you lose all context. Frustrating.

Claude Code has been suspended. Run `fg` to bring Claude Code back.
Note: ctrl + z now suspends Claude Code, ctrl + _ undoes input.
node:internal/process/per_thread:230
        throw new ERR_UNKNOWN_SIGNAL(sig);
        ^

TypeError [ERR_UNKNOWN_SIGNAL]: Unknown signal: SIGSTOP
    at process.kill (node:internal/process/per_thread:230:15)
    at P71.handleSuspend (file:///C:/nodepath/node-v22.17.1/node_modules/@anthropic-ai/claude-code/cli.js:584:1908)
    at P71.handleInput (file:///C:/nodepath/node-v22.17.1/node_modules/@anthropic-ai/claude-code/cli.js:584:1159)
    at P71.processInput (file:///C:/nodepath/node-v22.17.1/node_modules/@anthropic-ai/claude-code/cli.js:584:667)
    at ReadStream.handleReadable (file:///C:/nodepath/node-v22.17.1/node_modules/@anthropic-ai/claude-code/cli.js:584:1049)
    at ReadStream.emit (node:events:518:28)
    at ReadStream.emit (node:domain:489:12)
    at emitReadable_ (node:internal/streams/readable:834:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
  code: 'ERR_UNKNOWN_SIGNAL'
}

Node.js v22.17.1

user@machine MINGW64 /c/currentpath (main)
$ fg
bash: fg: current: no such job

Steps to Reproduce

  1. press ctrl-z

Expected Behavior

I was expecting "undo", but that is just "muscle memory" because I happen to be in my IDE.

~~I'd love it if did some kind of undo. But I'm not really sure what you would define "undo" to mean, in a global sense.~~

~~In the context I keep accidentally pressing it - I was intending it to "undo" the stuff I just typed, as the IDE would. Logically, this would be more than just backspace - undo in the IDE tracks cursor position etc.~~

~~Seems like full undo behavior, whatever that means, would be a large amount of work.~~

Never mind, I just saw that part about ctrl + _ undoes input in the message, nice.

My LLM suggested hacking claude with:

if (process.platform !== 'win32') {
  process.kill(pid, 'SIGSTOP')
}

Actual Behavior

Press ctrl+z, claude dies and you lose all context. Frustrating.

Additional Context

Great work on claude-code so far!
Please take this report in the spirit it is intended - to help make a great product even better.

View original on GitHub ↗

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