gemini-cli - 💡(How to fix) Fix Stop Auto Memory from retrying low-signal sessions indefinitely [1 comments, 2 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#26522Fetched 2026-05-06 06:35:49
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×3commented ×1cross-referenced ×1parent_issue_added ×1

Root Cause

Auto Memory only records a candidate session as processed when the extraction agent successfully reads the transcript with read_file. If the agent sees a session in the index and decides not to read it because it looks low-signal, that session remains unprocessed and can be surfaced again in future runs.

RAW_BUFFERClick to expand / collapse

Problem

Auto Memory only records a candidate session as processed when the extraction agent successfully reads the transcript with read_file. If the agent sees a session in the index and decides not to read it because it looks low-signal, that session remains unprocessed and can be surfaced again in future runs.

Relevant code:

  • packages/core/src/services/memoryService.ts

The current flow tracks processed sessions through processedSessionKeys, which is populated from successful read_file activity. Sessions that are surfaced to the agent but intentionally skipped are recorded as candidates, but not as processed.

Impact

  • Low-signal sessions can repeatedly consume background extraction runs.
  • The 30-minute throttle reduces frequency but does not solve repeated work.
  • Backlog rotation helps, but repeated retries still make the service less predictable and more expensive over time.

Expected Behavior

Auto Memory should distinguish between:

  • sessions successfully inspected via read_file
  • sessions intentionally skipped as low-signal
  • sessions that failed to read and may need retry

Low-signal skipped sessions should not keep resurfacing as new candidates on every extraction run.

Acceptance Criteria

  • Candidate sessions can be recorded as skipped or attempted even if not read.
  • Repeated low-signal sessions do not keep resurfacing every extraction interval.
  • Failed reads remain distinguishable from intentional skips.
  • Tests cover a candidate session that is surfaced but not read by the extraction agent.

Notes

This is primarily a background reliability and cost-control issue. The goal is not to force the extractor to read more sessions, but to persist a terminal or backoff state when it chooses not to inspect a candidate.

extent analysis

TL;DR

Update the memoryService to track and distinguish between successfully inspected, intentionally skipped, and failed sessions.

Guidance

  • Modify the processedSessionKeys logic in memoryService.ts to account for sessions that are intentionally skipped due to low-signal.
  • Introduce a new state or flag to mark sessions as skipped or attempted, even if not read, to prevent resurfacing.
  • Update the extraction agent to persist a terminal or backoff state when choosing not to inspect a candidate session.
  • Ensure tests cover the scenario of a candidate session being surfaced but not read by the extraction agent.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The solution requires careful consideration of the existing memoryService implementation and the extraction agent's logic to ensure correct tracking and distinction between different session states.

Recommendation

Apply a workaround by updating the memoryService to track skipped sessions and introduce a new state for intentional skips, as this addresses the primary reliability and cost-control issue without requiring a full overhaul of the system.

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

gemini-cli - 💡(How to fix) Fix Stop Auto Memory from retrying low-signal sessions indefinitely [1 comments, 2 participants]