hermes - 💡(How to fix) Fix [Bug]: background memory review may be missed. [1 pull requests]

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…

Error Message

The "_turns_since_memory" is consumed for nothing, if "run_conversation" exits in iterations for some error case.

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

none

---
RAW_BUFFERClick to expand / collapse

Bug Description

According to the "run_conversation" methond impl in conversation_loop.py, here are the sequences:

  1. "_should_review_memory" is set to True, and accumulated number in "_turns_since_memory" is consumed.
  2. run the iterations with several exit paths.
  3. check "_should_review_memory", and decide start the background memory review thread or not.

Here is the issue: In CLI mode(hydration is skipped‌) , if "run_conversation" exits in step 2, the "_turns_since_memory" consumed in step 1 is wasted: "_turns_since_memory" will start from 0 next turn, but no memory review was triggered.

Steps to Reproduce

  1. use CLI mode run 9 turns. (or change settings to save turns)
  2. in the 10th turn, trigger or embed some exit path in the interations.
  3. no background memory review started this turn. It comes next 10 turns.

Expected Behavior

The "_turns_since_memory" should not be consumed for nothing. The consumption should be bound to the review thread.

Actual Behavior

The "_turns_since_memory" is consumed for nothing, if "run_conversation" exits in iterations for some error case.

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Debug Report

none

Operating System

Win 10 + WSL2

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

The consumption line in 439 ("agent._turns_since_memory = 0"), should be moved to before/after line 4156 ("agent._spawn_background_review"), depending on programming style.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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

hermes - 💡(How to fix) Fix [Bug]: background memory review may be missed. [1 pull requests]