gemini-cli PR propagates real MCP errors in headless mode instead of useless hints

Lokesh0652H · ghdev · 2026-11-29

A community PR (#30527) on google-gemini/gemini-cli fixes headless MCP diagnostics that suppressed the underlying error and suggested the interactive /mcp list command, which can't be used in non-interactive runs. The change detects headless mode via cliConfig.isInteractive(), emits diagnostics with server attribution, severity, and sanitized error messages (via sanitizeErrorMessage for credential redaction), and retains enriched errors in lastErrors, leaving interactive mode unchanged. Validation includes a targeted vitest suite (43 tests covering error propagation, dedup, and secret redaction) plus typecheck.

Original post →

More from coding & agent

coding & agent channel →