feat(honcho): restore full integration parity in memory provider plugin - #4355
Merged
Conversation
erosika
force-pushed
the
eri/honcho-plugin-parity
branch
2 times, most recently
from
April 2, 2026 21:22
e1ae799 to
17fefc9
Compare
erosika
changed the base branch from
hermes/hermes-940f3eca
to
hermes/hermes-50668d84
April 2, 2026 21:22
Implements all features from the post-merge Honcho plugin spec: B1: recall_mode support (context/tools/hybrid) B2: peer_memory_mode gating (stub for ABC suppression mechanism) B3: resolve_session_name() session key resolution B4: first-turn context baking in system_prompt_block() B5: cost-awareness (cadence, injection frequency, reasoning cap) B6: memory file migration in initialize() B7: pre-warming context at init Ports from open PRs: - NousResearch#3265: token budget enforcement in prefetch() - NousResearch#4053: cron guard (skip activation for cron/flush sessions) - NousResearch#2645: baseUrl-only flow verified in is_available() - NousResearch#1969: aiPeer sync from SOUL.md - NousResearch#1957: lazy session init in tools mode Single file change: plugins/memory/honcho/__init__.py No modifications to client.py, session.py, or any files outside the plugin.
Adds observationMode config field to HonchoClientConfig: - 'unified' (default): user peer self-observations, all agents share one pool - 'directional': AI peer observes user, each agent keeps its own view Changes: - client.py: observation_mode field, _normalize_observation_mode(), config resolution - session.py: add_peers respects mode (peer observation flags), dialectic_query routes through correct peer, create_conclusion uses correct observer
erosika
force-pushed
the
eri/honcho-plugin-parity
branch
from
April 2, 2026 22:39
4f7de49 to
1d84edb
Compare
erosika
marked this pull request as ready for review
April 2, 2026 22:40
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
Restores full Honcho integration parity in the memory provider plugin and adds configurable observation modes.
Stacked on #4623. All ABC-compliant (
session_idkwargs preserved onprefetch,queue_prefetch,sync_turn;**kwargsonon_turn_start).What this adds
The base Honcho plugin in #4623 is functional but minimal — it always runs in hybrid mode with no cost controls, no session naming, no first-turn baking, no lazy init, and hard-codes both peers to observe everything. This PR restores the full feature set from the old baked-in integration and adds observation mode configurability.
Observation modes (new)
observationModeconfig field:unified(default) ordirectional.observeOthers=falseobserveOthers=truepeer.chat()userPeer.chat(query)aiPeer.chat(query, target=userPeer)userPeer.conclusions_of(userPeer)aiPeer.conclusions_of(userPeer)Files changed:
client.py(config field + normalization),session.py(add_peers, dialectic_query, create_conclusion all respect the mode).Config aliases:
shared→unified,separate/cross→directional.Recall modes (B1)
recall_modeconfig field:context,tools, orhybrid(default).contextget_tool_schemas())toolshybridPeer memory mode gating (B2)
Stub for
peer_memory_mode— reads per-peer config (honcho/local/hybrid) and sets_suppress_memory/_suppress_user_profileflags. When Honcho owns a peer's memory, the built-in MEMORY.md/USER.md writes can be suppressed. Wiring into BuiltinMemoryProvider is a follow-up.Session name resolution (B3)
Replaces the naive
platform:user_idsession key withcfg.resolve_session_name():Per-directory session isolation works out of the box. Manual
honcho mapoverrides respected.First-turn context baking (B4)
On the first
system_prompt_block()call, fetches the full Honcho context (user representation, peer card, AI representation, AI identity card) and bakes it into the system prompt. Subsequent calls return the cached block — prompt caching stability across multi-turn conversations.Cost awareness (B5)
Config-driven cost controls:
injectionFrequencyevery-turnfirst-turninjects prefetch only on turn 0contextCadence1dialecticCadence1reasoningLevelCapTurn tracking via
on_turn_start(). Cadence checks gate bothprefetch()consumption andqueue_prefetch()firing.Memory file migration (B6)
One-time migration of local memory files (MEMORY.md, USER.md, SOUL.md) into Honcho when a new session has zero messages. Uses
migrate_memory_files()on the session manager.Pre-warming (B7)
On eager init (context/hybrid mode), fires background
prefetch_context()andprefetch_dialectic()threads immediately so the first turn has cached results ready.Ports from open PRs
_truncate_to_budget()— truncates prefetch result tocontext_tokens * 4chars at word boundaryagent_contextandplatformkwargs; skips all activation for cron/flush contextsis_available()acceptsapi_key OR base_url(not both required)name:or markdown# Headingto auto-setcfg.ai_peer_do_session_init()until firsthandle_tool_call()via_ensure_session()Architecture
Files changed
What's NOT in this PR
_suppress_memory/_suppress_user_profileflagsnot session.messagesguardRelated: #4623, #3276