Gemini CLI fixes macOS sandbox crashes by embedding Seatbelt profiles
amelidev · ghdev · 2026-07-28
What changed
This PR fixes a startup crash in Gemini CLI when running in sandbox mode on macOS/gMac environments where the static Seatbelt .sb profiles are missing from the bundle or runfiles.
How it works
- Embeds the six built-in macOS Seatbelt profiles directly in sandboxBuiltinProfiles.ts
- If the physical profile file is missing at runtime, Gemini CLI writes the embedded profile to a randomized temp file under /tmp
- Adds cleanup hooks for exit, SIGINT, SIGTERM, and child-process close / error
- Keeps normal local-dev behavior unchanged when the file is present
Validation
The author says the fix is covered by unit tests and passes the targeted test suite for src/utils/sandbox.test.ts.
More from coding & agent
- Nativ v0.1.0 Released: Run AI Models Locally on Apple Silicon with Multi-IDE Support — max_paperclips · 2026-07-28
- CodeGraph made local token counts spike, but provider logs showed the run used fewer tokens — TruthTellerTom · 2026-07-28
- A practical guide to when to use ChatGPT, Claude, and agent modes — Simon Willison · 2026-07-28
- Locally Hosted Kimi K3 Beats Cloud GPT-5.6 in 3D Physics Generation — rohanpaul_ai · 2026-07-28
- Hermes Desktop Avatar wraps a local agent in an always-on-top chat UI — TinfoilTricorn · 2026-07-28
- Berkeley-led paper maps three autonomy levels for software development — dawnsongtweets · 2026-07-28