fix(honcho): keep injected memory context silent#18062
Open
flyespresso wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<memory-context>system note so injected memory is explicitly assistant-only backgroundWhy
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 -q→198 passedgit 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.pyNote:
.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.