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
- UNC's Wanda: agentic AI for neuroimaging validated on 123,000 brains — PTenigma · 2026-12-02
- Software products need an API/MCP/plugin now: agents will drive acquisition and retention — omooretweets · 2026-12-02
- AI coding tools are self-configuring: install Claude Code and you're done — _jaydeepkarale · 2026-12-02
- Image-to-Blender showdown: Neon crushes Opus with a huge gap — YouJiacheng · 2026-12-02
- Matt Shumer says collaborating with Jacob humbles his AI-orchestration skills ahead of Spawn — mattshumer_ · 2026-12-02
- LiveCraft benchmark: top agents score just 30.3/100 in real-time Minecraft worlds — Chengxing Xie · 2026-12-02