…ion recall
When sharedSessions is set in honcho.json, the plugin merges context from
each listed Honcho session into the recall payload. Lets canonical /
hydrated corpora populated by separate tooling be available to dialogue
recall without changing per-thread session isolation.
Default: empty list (no behavior change).
- HonchoClientConfig: new shared_sessions field, parsed from sharedSessions
- HonchoMemoryManager: stores list, get_session_context merges shared
session context as result[shared_context] = [{session_id, summary,
recent_messages}, ...]
- honcho_context tool: renders shared_context under Shared canonical
context section
When sharedSessions is set in honcho.json, the plugin merges context from each listed Honcho session into the recall payload. Lets canonical / hydrated corpora populated by separate tooling be available to dialogue recall without changing per-thread session isolation.
Default: empty list (no behavior change).
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs
Description
Problem
The Honcho plugin resolves a per-thread session ID for each chat (via
sessionStrategy: per-directoryorgateway_session_keyfor gateway platforms). Dialogue recall (get_session_context) reads from that session only. Canonical knowledge that lives in dedicated Honcho sessions populated by external tooling (hydration pipelines, governance corpora, knowledge bases ingested by separate processes) is invisible to Hermes during dialogue.This is intentional behavior for chat isolation, but it blocks a real use case: operators who maintain canonical knowledge stores in Honcho want that content available to Hermes recall without breaking the per-thread isolation that protects user privacy across conversations.
Solution
Add an opt-in
sharedSessionsconfig field to the honcho plugin. When set, the plugin merges context from each listed session into the recall payload, in addition to the per-thread session that's resolved by the existing logic.Default: empty list. No behavior change for existing users.
Code structure
Three files modified, ~54 lines added:
plugins/memory/honcho/client.py—HonchoClientConfiggains ashared_sessions: list[str]field. Parsed fromsharedSessionsin the JSON config (withhost_blockfallback consistent with other fields).plugins/memory/honcho/session.py—HonchoMemoryManager.__init__storesself._shared_sessions.get_session_contextcallsself.honcho.session(sid).context(summary=True)for each shared session, extracts summary + recent messages, and appends to the result under a newshared_contextkey:plugins/memory/honcho/__init__.py— Thehoncho_contexttool rendersshared_contextunder a labelled## Shared canonical contextsection so consumers can distinguish active-session content from shared content.Failure modes
Each shared session fetch is wrapped in try/except. A failed lookup (session doesn't exist, network blip, permissions) logs at debug level and falls through. No exception propagates to break the dialogue. Per-shared-session failures are isolated; one bad ID doesn't kill the whole recall.
Backward compatibility
[].Use case (motivating the change)
The reporter maintains a self-hosted federated memory architecture where Cowork (Claude Desktop) writes session summaries to a canonical Honcho session via separate hydration tooling. With this change, the operator sets
sharedSessions: ["hermes-canonical"]inhoncho.jsonand Hermes-via-Discord can answer questions grounded in the Cowork-written corpus while still maintaining per-thread isolation for live chat conversations.Verification
Locally verified end-to-end:
feature/shared-sessions-recall, commit42d2962d4.from plugins.memory.honcho.client import HonchoClientConfigshows the new field with default[].HonchoClientConfig.from_global_config()correctly loadssharedSessions: ["hermes"]intoshared_sessions: ['hermes']."What is MARKER_FEDARCH_REVIEW_LAVENDER?"— Hermes responds"The injected memory context confirms..."and surfaces the marker from the shared session content, confirming the merge path is functioning.Optional follow-up
sharedSessionsMaxMessagesint field if 5 recent messages per session isn't the right default for some operators.get_session_contextso each shared session can also do a semantic search instead of just returning the last N messages. Separate PR.tests/honcho_plugin/exercising the merge path with mock Honcho sessions.Diff stat
How to submit
From the dell WSL shell with the feature branch checked out:
Or use
ghif installed: