Summary
Gemini CLI currently uses a high default threshold for tool output truncation (DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 4,000,000 characters). Recent observations show that large MCP tool outputs (e.g., get_table_schema from the F1 MCP server) can cause the CLI to experience performance issues or "choke" before this limit is reached.
With the introduction of Gemini 3, we have an opportunity to be more aggressive with truncation and summarization, as the model is significantly more effective at reasoning over compressed or truncated context.
Proposed Changes
- Lower Default Thresholds: Re-evaluate and significantly lower the
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD. The goal is to find a "sweet spot" that maintains UI responsiveness while providing sufficient context.
- Gemini 3 Benchmarking: Conduct thorough validation at the benchmarking layer to ensure that more aggressive truncation does not degrade task success rates for Gemini 3.
- Optimize Redirection UX: Ensure that when truncation occurs and output is redirected to a file, the experience remains seamless and the model is clearly informed on how to access the full content if necessary.
Context
Part of #15330
Summary
Gemini CLI currently uses a high default threshold for tool output truncation (
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD= 4,000,000 characters). Recent observations show that large MCP tool outputs (e.g.,get_table_schemafrom the F1 MCP server) can cause the CLI to experience performance issues or "choke" before this limit is reached.With the introduction of Gemini 3, we have an opportunity to be more aggressive with truncation and summarization, as the model is significantly more effective at reasoning over compressed or truncated context.
Proposed Changes
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD. The goal is to find a "sweet spot" that maintains UI responsiveness while providing sufficient context.Context
Part of #15330