gemini-cli - 💡(How to fix) Fix [Feature Request] Implement block attention to enable more nuanced memory and context engineering per request in Gemini [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#25367Fetched 2026-04-15 06:45:21
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2
RAW_BUFFERClick to expand / collapse

What happened?

Currently, Google's LLMs store context linearly, new content is added at the end, and earlier parts can't be modified or removed from context even when they no longer serve a purpose.

This research paper solves the issue of LLM context being linearly additive, even though the needs of practical memory management require that it be possible to add / subtract / expand / contract pieces based on the needs of the current request.

https://arxiv.org/pdf/2409.15355

I think Gemin's agentic capabilities and coding capabilities would get a big boost from using this idea.

Note: In the ideal case, users / API callers should have the ability to construct context and have it dynamically match against cached pieces.

What did you expect to happen?

I'd like lower costs and also reduced degradation in performance due to context rot... Which is what the above message addresses.

Client information

  • CLI Version: 0.36.0
  • Git Commit: 8b1e649c2
  • Session ID: 0dbd5819-01ab-40be-971b-21b0125ea3b9
  • Operating System: darwin v22.21.1
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 81.0 MB
  • Terminal Name: ghostty 1.3.1
  • Terminal Background: #282c34
  • Kitty Keyboard Protocol: Supported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

Implementing a dynamic context management system, as proposed in the research paper, could potentially address the issue of linearly additive LLM context and improve performance.

Guidance

  • Review the research paper (https://arxiv.org/pdf/2409.15355) to understand the proposed solution for dynamic context management.
  • Consider how the ideas presented in the paper could be applied to Gemin's agentic capabilities and coding capabilities to improve context management.
  • Investigate the feasibility of implementing a system that allows users/API callers to construct context and dynamically match it against cached pieces.
  • Evaluate the potential benefits of such a system, including reduced costs and improved performance due to minimized context rot.

Notes

The provided information lacks specific technical details about the current implementation, making it challenging to provide a more detailed solution. The research paper seems to offer a potential solution, but its implementation would require further investigation and consideration of the specific requirements and constraints of the Gemin system.

Recommendation

Apply workaround: Implementing a dynamic context management system, as proposed in the research paper, could potentially address the issue of linearly additive LLM context and improve performance. This approach may require significant development and testing efforts but could lead to improved performance and cost savings.

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