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
- Capturing License Plates Reliably in Multilingual Voice Agents — Bemaitis · 2026-08-24
- From "cheapest" to "best fit": the evolution of AI model routing — jasonkneen · 2026-08-24
- Managing AI agents between weight lifting sets creates a productive workflow — julianharris · 2026-08-24
- Codex Hidden Setting: Enabling Max effort unlocks higher reasoning depth — RileyRalmuto · 2026-08-24
- Developer Reverse-Engineers 520 GPT-Image2 Cases Into an Atomic Prompt Skill Library — bigaiguy · 2026-08-24
- Agent Memory Should Track Outcomes, Not Just Steps: Adding Success Counters to Workflows — No_Advertising2536 · 2026-08-24