gemini-cli ACP mode skips tool output truncation, letting one command blow past the 1M token limit

barney-s · ghdev · 2026-10-16

The bug

Issue #29777 on google-gemini/gemini-cli reports that when gemini-cli runs as an ACP agent (gemini --acp), the tools.truncateToolOutputThreshold setting (default 40,000 characters) is never applied — tool output is sent to the model in full. A single shell command with large output can push the request past the model's input limit, failing with 400: input token count exceeds 1048576. In interactive and -p modes, the same command is truncated as documented.

Root cause

Observed in practice

Agent developers wiring gemini-cli into ACP clients with auto-approval (yolo) should avoid commands with large outputs until this is fixed.

Original post →

More from coding & agent

coding & agent channel →