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:

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.

Original post →

More from coding & agent

coding & agent channel →