gemini-cli - 💡(How to fix) Fix context overflow (????) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26969Fetched 2026-05-14 03:46:15
View on GitHub
Comments
0
Participants
1
Timeline
9
Reactions
0
Participants
Timeline (top)
labeled ×6added_to_project_v2 ×1issue_type_added ×1unlabeled ×1
RAW_BUFFERClick to expand / collapse

What happened?

│ Tool Calls: 10 ( ✓ 9 x 1 ) │ │ Success Rate: 90.0% │ │ User Agreement: 100.0% (9 reviewed) │ │ │ │ Performance │ │ Wall Time: 34m 57s │ │ Agent Active: 29m 28s │ │ » API Time: 29m 14s (99.2%) │ │ » Tool Time: 14.2s (0.8%) │ │ │ │ │ │ Model Usage │ │ Use /model to view model quota information │ │ │ │ Model Reqs Input Tokens Cache Reads Output Tokens │ │ ───────────────────────────────────────────────────────────────────────────────────────────────────────── │ │ gemini-3-flash-preview 188 3,607,845 1,497,708 20,851 │ │ ↳ main 62 1,588,116 1,403,685 476 │ │ ↳ utility_compressor 92 1,292,067 73,601 10,853 │ │ ↳ utility_state_snapshot_… 33 720,730 16,360 9,502 │ │ ↳ utility_tool 1 6,932 4,062 20 │ │ gemini-3.1-pro-preview 3 0 0 0 │ │ ↳ utility_compressor 3 0 0 0 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

/compress
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ✕ Failed to compress chat history: Failed to generate content: The input token count exceeds the maximum number of tokens allowed 1048576.

What did you expect to happen?

I think this should never happen right? It should just keep compressing context automatically and it should never get to this state, I can't even compress it now and the session is completely borked. I have to start from scratch.

Client information

  • CLI Version: 0.42.0
  • Git Commit: 68e2196d5
  • Session ID: 0e40dae4-e494-4288-a726-8cd1ebc91a7a
  • Operating System: darwin v24.15.0
  • Sandbox Environment: sandbox-exec (permissive-open)
  • Model Version: gemini-3-flash-preview
  • Auth Type: oauth-personal
  • Memory Usage: 114.9 MB
  • Terminal Name: Unknown
  • Terminal Background: #000000
  • Kitty Keyboard Protocol: Unsupported

Login information

Google Account

Anything else we need to know?

This keeps happening but I think it started after an update some time ago. You should be able to find why this happens.

Context Compression Threshold 0.4 (40%)* │ │ The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3).

I also get very annoying tool use related messages all the time that fill up the chat, I will file that bug additionally!

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING