Gemini CLI Fixes Crash During Git Authentication

ehsan-fj · ghdev · 2026-09-02

This PR fixes a crash in the Gemini CLI occurring within restricted permission environments like macOS Seatbelt. Previously, the CLI would monitor the .git directory via the useGitBranchName hook; if permissions triggered an unhandled asynchronous error event, the Node process would terminate. The update adds an error listener to the file watcher to handle errors gracefully without crashing the CLI, and includes a new unit test to verify the fix.

Original post →

More from coding & agent

coding & agent channel →