What happened?
The Gemini CLI crashes on Windows when attempting to execute a chmod +x command.
Steps to Reproduce:
- Launch the Gemini CLI on a Windows machine.
- Ask the agent to execute a chmod +x command on any file. For example:
chmod +x C:\Users\Kris\stremio-nvenc\stremio-docker-nvidia\entrypoint.sh
- The CLI crashes instantly.
What did you expect to happen?
The CLI should not crash. It should handle the error gracefully by reporting that chmod is not a recognized command on Windows.
Client information
- CLI Version: 0.6.1
- Git Commit: f307813
- Session ID: 44e0bd13-5b49-4cce-857f-3527082e3302
- Operating System: win32 v22.20.0
- Sandbox Environment: no sandbox
- Model Version: gemini-2.5-pro
- Memory Usage: 205.4 MB
Login information
Google Account OAUTH
Anything else we need to know?
This crash occurs because chmod is not a native Windows cmd.exe command. The shell process inside the pseudo-terminal
exits immediately upon receiving the invalid command, but the CLI tool subsequently attempts to interact with the
now-defunct terminal, leading to a fatal error.
Full Error Log:
`
C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsPtyAgent.js:93
throw new Error('Cannot resize a pty that has already exited');
^
Error: Cannot resize a pty that has already exited
at WindowsPtyAgent.resize
(C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsPtyAgent.js:93:19)
at WindowsTerminal. (C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell
\node-pty\windowsTerminal.js:131:26)
at Object.run (C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windows
Terminal.js:167:50)
at
C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsTerminal.js:73:32
at Array.forEach ()
at Socket.
(C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsTerminal.js:68:42)
at Socket.emit (node:events:531:35)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
Node.js v22.20.0
`
What happened?
The Gemini CLI crashes on Windows when attempting to execute a chmod +x command.
Steps to Reproduce:
chmod +x C:\Users\Kris\stremio-nvenc\stremio-docker-nvidia\entrypoint.sh
What did you expect to happen?
The CLI should not crash. It should handle the error gracefully by reporting that chmod is not a recognized command on Windows.
Client information
Login information
Google Account OAUTH
Anything else we need to know?
This crash occurs because chmod is not a native Windows cmd.exe command. The shell process inside the pseudo-terminal
exits immediately upon receiving the invalid command, but the CLI tool subsequently attempts to interact with the
now-defunct terminal, leading to a fatal error.
Full Error Log:
`
C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsPtyAgent.js:93
throw new Error('Cannot resize a pty that has already exited');
^
Error: Cannot resize a pty that has already exited
at WindowsPtyAgent.resize
(C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsPtyAgent.js:93:19)
at WindowsTerminal. (C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell
\node-pty\windowsTerminal.js:131:26)
at Object.run (C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windows
Terminal.js:167:50)
at
C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsTerminal.js:73:32
at Array.forEach ()
at Socket.
(C:\Users\Kris\AppData\Roaming\npm\node_modules@google\gemini-cli\node_modules@lydell\node-pty\windowsTerminal.js:68:42)
at Socket.emit (node:events:531:35)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
Node.js v22.20.0
`