Skip to content

fix(honcho): keep injected memory context silent#18062

Open
flyespresso wants to merge 1 commit into
NousResearch:mainfrom
flyespresso:fix/honcho-silent-memory-context
Open

fix(honcho): keep injected memory context silent#18062
flyespresso wants to merge 1 commit into
NousResearch:mainfrom
flyespresso:fix/honcho-silent-memory-context

Conversation

@flyespresso

Copy link
Copy Markdown

Summary

  • strengthen the <memory-context> system note so injected memory is explicitly assistant-only background
  • add Honcho system prompt guidance for context/hybrid modes to use injected memory silently and not attribute it to user messages
  • cover the expanded sanitizer note and Honcho prompt guardrail with focused tests

Why

Hermes already strips literal <memory-context> spans from streamed output, but hybrid/context Honcho mode can still lead the model to verbally reference injected memory as if it was user-authored text, e.g. saying the user pasted/provided a memory block. This keeps the existing auto-injection behavior while making the boundary explicit in both the injected note and static Honcho memory prompt.

Tests

  • .venv/bin/python -m pytest tests/agent/test_memory_provider.py tests/agent/test_streaming_context_scrubber.py tests/honcho_plugin/test_session.py -q198 passed
  • git diff --check
  • .venv/bin/python -m py_compile agent/memory_manager.py plugins/memory/honcho/__init__.py tests/agent/test_memory_provider.py tests/honcho_plugin/test_session.py

Note: .venv/bin/python -m ruff check ... currently reports pre-existing unused-import/unused-variable findings in these files unrelated to this patch, so I left lint cleanup out of scope.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers labels Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants