gemini-cli - 💡(How to fix) Fix v0.44.0 Regression: Critical crash with ioctl(2) failed, EBADF during PTY resize [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

terminal that has already been closed. The error EBADF is not caught in the current try-catch block. 1 Error: ioctl(2) failed, EBADF

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

What happened?

Title: v0.44.0 Regression: Critical crash with ioctl(2) failed, EBADF during PTY resize

Description: A regression in _ShellExecutionService.resizePty causes the CLI to crash on Linux when a resize event occurs for a terminal that has already been closed. The error EBADF is not caught in the current try-catch block.

Stack Trace:

1 Error: ioctl(2) failed, EBADF 2 at UnixTerminal.resize (.../node-pty/unixTerminal.js:243:13) 3 at _ShellExecutionService.resizePty (.../bundle/chunk-BE42OOYM.js:320262:30)

Proposed Fix: Update the catch block in resizePty to ignore EBADF:

1 const isEbadf = err2.message?.includes("EBADF"); 2 if (isEsrch || isWindowsPtyError || isEbadf) { 3 // Ignore 4 }

https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml&title=&info=%0A*%20**CLI%20Version%3A** %200.43.0%0A*%20Git%20Commit%3A%20c0775c38b%0A*%20Session%20ID%3A%2020f04429-7e15-4963-9a78-29790e30baaa%0A*%2 0Operating%20System%3A%20linux%20v24.12.0%0A*%20Sandbox%20Environment%3A%20no%20sandbox%0A*%20Model%20Versio n%3A%20auto-gemini-3%0A*%20Auth%20Type%3A%20gemini-api-key%0A*%20Memory%20Usage%3A%201.06%20GB%0A*%20Termi nal%20Name%3A%20Unknown%0A*%20Terminal%20Background%3A%20%230c0c0c%0A*%20Kitty%20Keyboard%20Protocol%3A%20Un supported%0A&problem=%0A%0A%5BACTION%20REQUIRED%5D%20%F0%9F%93%8E%20PLEASE%20ATTACH%20THE%20EXPORTED%20CHAT%20HISTORY% 20JSON%20FILE%20TO%20THIS%20ISSUE%20IF%20YOU%20FEEL%20COMFORTABLE%20SHARING%20IT.

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

What did you expect to happen?

information only

Client information

  • CLI Version: 0.43.0
  • Git Commit: c0775c38b
  • Session ID: 20f04429-7e15-4963-9a78-29790e30baaa
  • Operating System: linux v24.12.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: gemini-api-key
  • Memory Usage: 1.06 GB
  • Terminal Name: Unknown
  • Terminal Background: #0c0c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

going back to v 43 helped

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING