fix(honcho): honor focused memory tool budgets#29403
Open
dso2ng wants to merge 1 commit into
Open
Conversation
0410456 to
3b3ab8d
Compare
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
honcho_context(query=...)through to focused Honcho peer context retrievalhoncho_search(max_tokens=...)output with deterministic token-budget trimmingFixes #29402.
Rationale
The Honcho tool schema already advertises a focused
queryparameter forhoncho_contextand amax_tokensbudget forhoncho_search. Before this change, the context tool ignoredquery, andsearch_context()assembled representation/card output without applying the requested budget. That made the memory tools noisier than callers expect from focused retrieval.This PR keeps the behavior intentionally narrow and backward-compatible: the tools still return the existing
{ "result": ... }shape, and it does not change peer routing semantics or introduce a new ranking API.Test plan
scripts/run_tests.sh tests/honcho_plugin/test_session.py::TestPeerLookupHelpers::test_search_context_applies_max_tokens_budget tests/honcho_plugin/test_session.py::TestConcludeToolDispatch::test_honcho_context_passes_query_to_manager tests/honcho_plugin/test_session.py::TestGetSessionContextFallback::test_query_uses_focused_peer_context_even_when_session_context_is_cached -q-> 3 failing testsscripts/run_tests.sh tests/honcho_plugin/test_session.py::TestPeerLookupHelpers::test_search_context_applies_max_tokens_budget tests/honcho_plugin/test_session.py::TestConcludeToolDispatch::test_honcho_context_passes_query_to_manager tests/honcho_plugin/test_session.py::TestGetSessionContextFallback::test_query_uses_focused_peer_context_even_when_session_context_is_cached -q-> 3 passedscripts/run_tests.sh tests/honcho_plugin/test_session.py -q-> 118 passedscripts/run_tests.sh tests/honcho_plugin -q-> 270 passedgit diff --checknon_ascii_added_lines=0Follow-ups intentionally left out
resultsarrays /top_k/ score metadata