-
Notifications
You must be signed in to change notification settings - Fork 288
Description
Environment:
- OS: Windows 11
- Node.js version: v22.12.0
- Package: node-pty (via @lydell/node-pty, dependency of @google/gemini-cli)
Description:
When running @google/gemini-cli on Windows 11 with Node.js v22, the process crashes with the following error:
Error: Cannot resize a pty that has already exited
at WindowsPtyAgent.resize (node_modules/@lydell/node-pty/windowsPtyAgent.js:93:19)
at WindowsTerminal. (node_modules/@lydell/node-pty/windowsTerminal.js:131:26)
at Object.run (node_modules/@lydell/node-pty/windowsTerminal.js:167:50)
...
Steps to reproduce:
- Install Node.js v22.12.0 on Windows 11.
- Install @google/gemini-cli globally (
npm install -g @google/gemini-cli). - Run a command that triggers an interactive PTY session (e.g. rebasing workflow).
- Observe crash when the PTY process exits and resize is attempted.
Expected behavior:
Resize calls after PTY exit should fail gracefully or be ignored, not crash the entire process.
Actual behavior:
Process crashes with uncaught error "Cannot resize a pty that has already exited".
Notes:
- This issue does not occur under Node.js v20 LTS.
- It appears to be a runtime compatibility problem between node-pty and Node.js v22 ABI/stream changes.
- Rebuilding node-pty from source (
gyp_rebuild=true) does not resolve the runtime crash.
Request:
Please add compatibility support for Node.js v22 on Windows, or handle PTY resize calls more gracefully after exit.