hermes - 💡(How to fix) Fix bug(honcho): saveMessages=false does not prevent sync_turn from persisting messages

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…

Root Cause

This preserves explicit conclusion writes because honcho_conclude uses the tool path / create_conclusion() rather than sync_turn().

Fix Action

Fix / Workaround

Validation from local patch

Live self-hosted Honcho validation using honcho-test profile after the patch:

So the patch blocks raw turn persistence while keeping explicit honcho_conclude / honcho_search / honcho_context working.

Code Example

{
  "enabled": true,
  "workspace": "hermes-sandbox",
  "peerName": "yahome",
  "recallMode": "tools",
  "sessionStrategy": "per-session",
  "writeFrequency": "session",
  "saveMessages": false,
  "baseUrl": "http://10.10.1.4:8000"
}

---

provider.sync_turn(
    "USER_AUTO_SYNC_SHOULD_NOT_WRITE",
    "ASSISTANT_AUTO_SYNC_SHOULD_NOT_WRITE",
    session_id=session_key,
)

---

messages_before: 0
messages_after_sync_turn: 2
auto_sync_leaked_count: 2

---

if self._config is not None and not self._config.save_messages:
    return

---

tests/test_honcho_save_messages.py

---

venv/bin/python -m pytest tests/test_honcho_save_messages.py -q
2 passed

venv/bin/python -m pytest tests/test_honcho_session_context.py tests/test_honcho_client_config.py -q
10 passed

venv/bin/python -m py_compile plugins/memory/honcho/__init__.py tests/test_honcho_save_messages.py
passed

---

save_messages: false
messages_before: 0
messages_after_sync_turn: 0
auto_sync_leaked_count: 0
conclude_ok: true
search_contains_fact: true
context_contains_fact: true
RAW_BUFFERClick to expand / collapse

Bug

plugins.memory.honcho.HonchoMemoryProvider.sync_turn() persists full user/assistant turn messages even when Honcho config sets saveMessages: false.

The config is parsed correctly (HonchoClientConfig.save_messages == False), but sync_turn() does not check the flag before appending messages to the local Honcho session and flushing via HonchoSessionManager._flush_session() / honcho_session.add_messages().

Impact

Users may configure Honcho in tools-only / explicit-memory mode expecting only honcho_conclude conclusions to be written, but full conversation turns are still persisted to Honcho /messages.

This weakens the safety boundary between:

  • explicit long-term facts written via honcho_conclude, and
  • raw chat transcripts that should not be automatically persisted when saveMessages is disabled.

It is similar in shape to prior Honcho attribution/pollution issues for cron/background agents, but this one affects the documented saveMessages switch itself.

Expected behavior

When saveMessages: false:

  • sync_turn() should return without writing user/assistant messages.
  • explicit memory writes such as honcho_conclude should still work.

When saveMessages: true:

  • existing sync_turn() message persistence behavior should remain unchanged.

Reproduction

Use a Honcho config like:

{
  "enabled": true,
  "workspace": "hermes-sandbox",
  "peerName": "yahome",
  "recallMode": "tools",
  "sessionStrategy": "per-session",
  "writeFrequency": "session",
  "saveMessages": false,
  "baseUrl": "http://10.10.1.4:8000"
}

Then initialize the Honcho provider and call:

provider.sync_turn(
    "USER_AUTO_SYNC_SHOULD_NOT_WRITE",
    "ASSISTANT_AUTO_SYNC_SHOULD_NOT_WRITE",
    session_id=session_key,
)

Observed before the fix:

messages_before: 0
messages_after_sync_turn: 2
auto_sync_leaked_count: 2

The two marker strings appeared in Honcho session context as recent messages.

Proposed fix

Add a guard near the top of HonchoMemoryProvider.sync_turn():

if self._config is not None and not self._config.save_messages:
    return

This preserves explicit conclusion writes because honcho_conclude uses the tool path / create_conclusion() rather than sync_turn().

Validation from local patch

Regression test added:

tests/test_honcho_save_messages.py

Test results:

venv/bin/python -m pytest tests/test_honcho_save_messages.py -q
2 passed

venv/bin/python -m pytest tests/test_honcho_session_context.py tests/test_honcho_client_config.py -q
10 passed

venv/bin/python -m py_compile plugins/memory/honcho/__init__.py tests/test_honcho_save_messages.py
passed

Live self-hosted Honcho validation using honcho-test profile after the patch:

save_messages: false
messages_before: 0
messages_after_sync_turn: 0
auto_sync_leaked_count: 0
conclude_ok: true
search_contains_fact: true
context_contains_fact: true

So the patch blocks raw turn persistence while keeping explicit honcho_conclude / honcho_search / honcho_context working.

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…

FAQ

Expected behavior

When saveMessages: false:

  • sync_turn() should return without writing user/assistant messages.
  • explicit memory writes such as honcho_conclude should still work.

When saveMessages: true:

  • existing sync_turn() message persistence behavior should remain unchanged.

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(honcho): saveMessages=false does not prevent sync_turn from persisting messages