gemini-cli - 💡(How to fix) Fix response of the model slowing when context increasing over 15% [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#26109Fetched 2026-04-29 06:35:53
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
2
Participants
Timeline (top)
labeled ×1
RAW_BUFFERClick to expand / collapse

What happened?

when the context window of the chat is increasing over 15% the response from the model is taking more than 10 mins and sometimes even 15 to 20 mins

What did you expect to happen?

whenever my chat context window is going over 15% the model slows down in generating the response. A quick fix is to compress the context by /compress command but it removes sometimes compresses the context soo much like it is of no use. expected behavior is atleast the response rate doesnt drop till 70-80% context

Client information

  • CLI Version: 0.39.1
  • Git Commit: 4d73f3413
  • Session ID: eb8310ab-8330-4574-b2d9-1d48a7149833
  • Operating System: linux v25.2.1
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 336.2 MB
  • Terminal Name: ghostty 1.3.1-arch2
  • Terminal Background: #1a1b26
  • Kitty Keyboard Protocol: Supported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The model response time increases significantly when the chat context window exceeds 15%, and a potential workaround is to optimize context compression to balance response time and context utility.

Guidance

  • Investigate the /compress command's compression algorithm to understand why it sometimes removes too much context, potentially leading to a loss of useful information.
  • Experiment with adjusting the compression ratio or implementing a custom compression strategy to find a balance between response time and context preservation.
  • Consider monitoring the model's performance at different context window sizes to identify the exact threshold at which response times become unacceptable.
  • Evaluate the feasibility of increasing the system's resources (e.g., memory, processing power) to handle larger context windows without significant performance degradation.

Notes

The provided information does not specify the exact nature of the compression algorithm or the model's architecture, which might be crucial in determining the best approach to optimizing performance.

Recommendation

Apply workaround: Implement a custom compression strategy to balance response time and context utility, as the current /compress command may not be optimal for all scenarios.

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