fix(tools): scope session_search to current gateway chat - #50030
Open
the3asic wants to merge 1 commit into
Open
Conversation
the3asic
force-pushed
the
abm/session-search-current-scope
branch
from
June 21, 2026 13:52
6614e42 to
831d493
Compare
the3asic
force-pushed
the
abm/session-search-current-scope
branch
from
June 28, 2026 17:16
831d493 to
1c67e09
Compare
Contributor
|
One overlap note from rechecking nearby work: PR #57981 ( My current read is:
The meaningful overlap looks operational rather than conceptual: both PRs currently add So if both lanes move forward, I would expect a manual merge on that shared test file — the two versions cover different scenarios and should both survive intact — rather than a duplication issue in the production logic. |
19 tasks
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
Fix
session_searchgateway scoping so Discord/Telegram/etc. gateway turns default to the current chat/thread instead of profile-wide history.Key pieces:
scope_key) plus minimal routing metadata (origin_json)session_key, so group/channel sessions can remain per-user while recall searches the whole current channel/threadHERMES_RECALL_SCOPE_KEYthrough gateway contextvars, cached agents, API server, and tool execution pathsscope='all'as the explicit opt-out for profile-wide/global historyVerification
Notes
A live dogfood DB was backed up before running the v18 migration, then migrated successfully:
~/.hermes/backups/state-before-recall-scope-v18-20260621T214508.db