fix(honcho): skip Honcho writes for cron sessions#4053
Closed
erosika wants to merge 3 commits into
Closed
Conversation
…ck path - test_browser_camofox: mock response now uses snapshot format (accessibility tree) - test_trajectory_compressor: mock _get_async_client instead of setting async_client directly
Cron prompts contain system instructions ('You are Hermes...') that
get written to Honcho as user messages via _honcho_sync(), causing
the dialectic model to misattribute agent traits to the user peer.
Guard both write paths:
- _honcho_sync(): skip when platform == 'cron'
- _honcho_save_user_observation(): reject when platform == 'cron'
This preserves Honcho read access (context injection) for cron
sessions while blocking the writes that corrupt user representations.
Closes NousResearch#4052
erosika
added a commit
to erosika/hermes-agent
that referenced
this pull request
Apr 2, 2026
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.
teknium1
pushed a commit
that referenced
this pull request
Apr 3, 2026
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: - #3265: token budget enforcement in prefetch() - #4053: cron guard (skip activation for cron/flush sessions) - #2645: baseUrl-only flow verified in is_available() - #1969: aiPeer sync from SOUL.md - #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.
zebster-cmd
added a commit
to zebster-cmd/hermes-agent
that referenced
this pull request
Apr 7, 2026
Ported from erosika's PR NousResearch#4053. The cron guard logic was already in the plugin architecture (_cron_skipped flag), but lacked test coverage. Added comprehensive tests for the cron write guard. Original run_agent.py changes are superseded by the plugin migration.
Contributor
Author
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
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.
Kye-AI-Kye
added a commit
to Kye-AI-Kye/hermes-agent
that referenced
this pull request
May 12, 2026
The Port NousResearch#4053 guard skipped Honcho init for both `cron` and `flush` contexts (and `platform == "cron"`). That hid the memory-provider tools (honcho_profile/search/context/reasoning/conclude) from scheduled jobs like daily-learning-review, which need them to read and update peer profiles. Narrow the guard to `agent_context == "flush"` only — cron jobs now get the same Honcho surface as interactive sessions. The `_cron_skipped` flag and its downstream short-circuits are kept for the flush case. Tool-call short-circuit message updated to drop the now-misleading "(cron context)" suffix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
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.
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
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.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
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.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
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.
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
Cron sessions auto-activate Honcho and write the cron prompt to Honcho as a user message via
_honcho_sync(), causing the dialectic model to misattribute agent traits (e.g. "You are Hermes, an AI assistant...") to the user peer. This corrupts the user representation over time.Root cause
cron/scheduler.pycreatesAIAgentwithoutskip_memory=Trueor any Honcho guardAIAgent.__init__reads global Honcho config and activates Honcho normally_honcho_sync(original_user_message, final_response)writes the cron prompt as a user peer messageThe gateway's
_flush_memories_for_sessionalready has acron_prefix guard for local memory, but the Honcho write path had no equivalent.Fix
Guard both Honcho write paths with
platform == "cron"checks:_honcho_sync(): early return, no messages written_honcho_save_user_observation(): returns error JSON, no observation createdHoncho read access (context injection into system prompt) is preserved for cron sessions — only writes are blocked.
Tests
6 new tests in
tests/test_honcho_cron_write_guard.py:Closes #4052
Related: #3276