Gemini CLI Fix: Prevents Output Inflation on Negative maxChars
Kanika0306 · ghdev · 2026-08-24
Fixes an output inflation bug in formatTruncatedToolOutput. When maxChars was negative, JavaScript's slice negative-index behavior caused the output to duplicate to approximately 2x the original size. The fix clamps maxChars using Math.max(0, maxChars) and guards against slice(-0) to prevent returning the full string.
More from coding & agent
- Deep Dive into Doubao Agent: Cloud PC Integration & Automated Workflows — AGI Hunt · 2026-08-24
- Silent Failures in My Test Suite: Config Traps in OpenTelemetry MCP — Thirumalaiboobathi · 2026-08-24
- AI Agent Phished via Email, Highlights Need for Separate Identity — _AustinCalvert_ · 2026-08-24
- Unofficial Local MCP Integration for Comfy UI — boricuapab · 2026-08-24
- AgentMercury: Synthesizing Verifiable Environments for Agents — Minbyul Jeong · 2026-08-24
- Cetus: open-source macOS desktop unifying Claude Code, Codex and agent harnesses — aigclink · 2026-08-24