Fix/honcho local mode gateway session#832
Closed
adavyas wants to merge 10 commits intoNousResearch:mainfrom
Closed
Fix/honcho local mode gateway session#832adavyas wants to merge 10 commits intoNousResearch:mainfrom
adavyas wants to merge 10 commits intoNousResearch:mainfrom
Conversation
…allMode Adds full Honcho memory integration to Hermes: - Session manager with async background writes, memory modes (honcho/hybrid/local), and dialectic prefetch for first-turn context warming - Agent integration: prefetch pipeline, tool surface gated by recallMode, system prompt context injection, SIGTERM/SIGINT flush handlers - CLI commands: setup, status, mode, tokens, peer, identity, migrate - recallMode setting (auto | context | tools) for A/B testing retrieval strategies - Session strategies: per-session, per-repo (git tree root), per-directory, global - Polymorphic memoryMode config: string shorthand or per-peer object overrides - 97 tests covering async writes, client config, session resolution, and memory modes
# Conflicts: # cli.py # run_agent.py
Tell users to go to app.honcho.dev > Settings > API Keys. Updated in setup walkthrough, setup prompt, and client error message.
Explain what context vs dialectic actually do in plain language: context = raw memory retrieval, dialectic = AI-to-AI inference for session continuity. Describe what user/AI peer cards are.
Matches the mental model: hybrid = context + tools, context = context only, tools = tools only.
New tool lets Hermes persist conclusions about the user (preferences, corrections, project context) directly to Honcho via the conclusions API. Feeds into the user's peer card and representation.
Consistent naming: all honcho tools now prefixed with honcho_ (honcho_context, honcho_search, honcho_profile, honcho_conclude).
Optional 'peer' parameter: "user" (default) or "ai". Allows asking about the AI assistant's history/identity, not just the user's.
Contributor
|
Consolidated into |
Contributor
|
Closing this PR — the branch is 258 commits behind main, and merging it would delete ~27,000 lines of current code (skin engine, email gateway, skills, dozens of test files, etc.). Additionally, the parent PR #736 (Honcho integration) is still open and hasn't been merged, so there's no Honcho code on main to fix yet. If these Honcho fixes are genuinely needed, they should be applied to PR #736's branch directly rather than submitted as a separate PR targeting main. Thanks for the contribution! |
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.
What does this PR do?
This PR is a focused follow-up to
pr-736that corrects two runtime integration issues in the current Honcho changes.First, it enforces
memoryMode=localat runtime. In the current PR branch,localmode is described as disabling Honcho, but Hermes can still initialize remote Honcho state, create sessions, and prewarm memory paths. This change makeslocalmode behave consistently with that contract when both active peers resolve tolocal.Second, it fixes gateway ownership of session-scoped Honcho state. The gateway currently creates short-lived
AIAgentinstances per request, butwriteFrequency="session"requires a Honcho manager that survives across requests within the same gateway session. This PR moves that ownership to the gateway session layer so the same Honcho manager is reused across messages and flushed at real session boundaries.This change is intentionally narrow. It does not add new configuration, change public schemas, or bundle unrelated cleanup. It keeps the PR aligned with the Hermes contributing guidance by focusing on one logical bug-fix area: making the current Honcho integration behave correctly.
Related Issue
Follow-up to #736
Type of Change
Changes Made
run_agent.pyto:localgateway/run.pyto:tests/test_run_agent.pycovering:memoryMode=localskipping Honcho activationtests/gateway/test_honcho_lifecycle.pycovering:How to Test
memoryMode=local.Validation performed for this branch:
pytest tests/test_run_agent.py -qpytest tests/gateway/test_honcho_lifecycle.py -qpytest tests/ -qpython -m hermes_cli.main doctorpython -m hermes_cli.main config checkpython -m hermes_cli.main chat -q "test message"Test result summary:
pytest tests/ -q->2692 passed, 5 skipped, 23 deselectedChecklist
Documentation & Housekeeping
cli-config.yaml.exampledid not require updatesScreenshots / Logs
Commits included:
7ffaaa0fix(honcho): enforce local mode and cache-safe warmup353a9e7fix(gateway): persist Honcho managers across session requests