gemini-cli - 💡(How to fix) Fix ENOTDIR Unhandled Promise Rejection when parsing multi-line prompt

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

Error Details:

  • Error: ENOTDIR: not a directory, lstat
  • Stack Trace Highlights: The error occurs in robustRealpath ->
RAW_BUFFERClick to expand / collapse

What happened?

The CLI crashed with a critical "Unhandled Promise Rejection" when I entered a multi-line prompt. It appears the CLI is attempting to treat the prompt text itself as a file path during a permission check or path resolution step.

Error Details:

  • Error: ENOTDIR: not a directory, lstat
  • Faulty Path: (The CLI tried to lstat a string starting with `/workspaces/.../stripe/stripe-js" followed by the rest of my prompt text).
  • Stack Trace Highlights: The error occurs in robustRealpath -> resolveToRealPath -> checkPermissions.

Steps to Reproduce: Paste a long, multi-line instruction into the chat (specifically one that might contain paths or quotes) and the CLI may attempt to validate it as a file path before processing the message.


What did you expect to happen?

I expected the cli to carry eth out as was directed on the prompt

Client information

  • CLI Version: 0.42.0
  • Git Commit: 68e2196d5
  • Session ID: 1593fa9c-3e21-4557-bda2-877da6534eaf
  • Operating System: linux v24.14.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 553.9 MB
  • Terminal Name: Unknown
  • Terminal Background: #05070d
  • Kitty Keyboard Protocol: Unsupported

Login information

Google Account

Anything else we need to know?

No response

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

gemini-cli - 💡(How to fix) Fix ENOTDIR Unhandled Promise Rejection when parsing multi-line prompt