gemini-cli - 💡(How to fix) Fix ioctl(2) failed, EBADF (Bad File Descriptor)

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

The CLI crashes with a critical error: Error: ioctl(2) failed, EBADF. This

RAW_BUFFERClick to expand / collapse

What happened?

The CLI crashes with a critical error: Error: ioctl(2) failed, EBADF. This happens consistently when running tools with high text output (like ffuf or nuclei) or when the terminal window is resized during a long-running command.

What did you expect to happen?

The CLI should handle high output volume and terminal window resizing without a kernel-level ioctl failure.

Client information

  • CLI Version: 0.44.0
  • Git Commit: 1000b33d4
  • Session ID: 08c540b0-f6d5-4a25-aaa2-25db09fedd22
  • Operating System: linux v22.14.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-3-flash-preview
  • Auth Type: oauth-personal
  • Memory Usage: 272.0 MB
  • Terminal Name: VTE(7600)
  • Terminal Background: #ffffff
  • Kitty Keyboard Protocol: Unsupported

Login information

Logging in via Personal Google Account (OAuth).

Anything else we need to know?

The crash seems related to node-pty failing to handle terminal resize events while the stdout buffer is being heavily used by subprocesses. It forces the entire Gemini CLI session to exit.

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