Skip to content

[Context Mgmt] Lower default tool output truncation thresholds for Gemini 3 #17037

@NTaylorMullen

Description

@NTaylorMullen

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

  1. 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.
  2. 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.
  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

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions