TypeError [ERR_UNKNOWN_SIGNAL]: Unknown signal: SIGSTOP on Windows when pressing Ctrl+Z
Claude Code has been suspended. Run fg to bring Claude Code back.
Note: ctrl + z now suspends Claude Code, ctrl + u undoes input.
node:internal/process/per_thread:223
throw new ERR_UNKNOWN_SIGNAL(sig);
^
TypeError [ERR_UNKNOWN_SIGNAL]: Unknown signal: SIGSTOP at process.kill (node:internal/process/per_thread:223:15) at p31.handleSuspend (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:568:1908) at p31.handleInput (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:568:1159) at p31.processInput (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:568:667) at ReadStream.handleReadable (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:568:1049) at ReadStream.emit (node:events:519:28) at ReadStream.emit (node:domain:488:12) at emitReadable_ (node:internal/streams/readable:832:12) at process.processTicksAndRejections (node:internal/process/task_queues:81:21) { code: 'ERR_UNKNOWN_SIGNAL' }
Expected Behavior: On Linux, pressing Ctrl + Z suspends the process and it can be resumed using fg. The same behavior is expected (or should be disabled gracefully) on Windows.
Actual Behavior: On Windows, SIGSTOP is not a valid signal and throws a TypeError from the Node.js runtime.
Environment:
OS: Windows 10/11
Node.js Version: v21.7.1
win-claude-code Version: npx win-claude-code@latest 1.0.44 (Claude Code)
Terminal: PowerShell / Windows Terminal
Suggested Fix:
Detect platform and avoid sending SIGSTOP on Windows.
Provide a platform-specific fallback or disable the suspend feature if not supported.
@iunius612 What is your powershell version?
@somersby10ml Name Value
PSVersion 5.1.22621.2506 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22621.2506 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
@iunius612 I can reproduce this issue on Node.js v21.7.1. However, on Node.js v22.11.0, the Ctrl+Z input is silently ignored (no crash). Would you consider upgrading your Node.js version as a potential workaround?
That's right. Thank you.