Gemini CLI fix normalizes DEBUG environment variable truthiness
Eswar809 · ghdev · 2026-08-24
This PR fixes the interpretation of the DEBUG environment variable across sandbox utilities in google-gemini/gemini-cli.
Problem:
Previous logic relied on JavaScript string truthiness. Non-empty strings like "false" or "0" evaluated to true, causing unintended behaviors:
- Docker/Podman sandboxes unnecessarily published the debug port (9229).
- macOS Seatbelt sandboxes injected --inspect-brk, pausing CLI execution unexpectedly.
- Debug console patching and image-pull logging were enabled despite user intent.
Fix:
Introduced a centralized isDebugModeEnabled() helper that strictly checks for explicitly enabled values ("true", "1", or active CLI flags), aligning sandbox logic with existing entrypoint behaviors.
More from coding & agent
- Developer builds inter-agent messaging for his AI agents — complete with message undo — baditaflorin · 2026-10-16
- How Codex Happened: inside OpenAI's comeback in coding — danshipper · 2026-10-16
- iOS 'dots' workflow: one Siri command turns screenshots into a background shopping and saving agent — nickbaumann_ · 2026-10-16
- Your widget tree is already a list of options: where Jev fits in Flutter — rseroter · 2026-10-16
- How OpenAI's Codex went from failed side project to 40M weekly users in under a year — danshipper · 2026-10-16
- Photon 2.0 launches unified messaging API for AI agents across iMessage and more — Scobleizer · 2026-10-16