fix(honcho): enforce contextTokens budget on prefetched Honcho context#3265
Closed
erosika wants to merge 2 commits into
Closed
fix(honcho): enforce contextTokens budget on prefetched Honcho context#3265erosika wants to merge 2 commits into
erosika wants to merge 2 commits into
Conversation
1142215 to
88c9a08
Compare
88c9a08 to
367e875
Compare
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.
Contributor
Author
|
Superseded by #9884 — contextTokens budget enforcement is handled by _truncate_to_budget() in the new plugin architecture. |
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.
13 tasks
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.
Refreshes #1878 onto current
main. Credit to @AzothZephyr for the original fix and for identifying the issue.Problem
Honcho's
context(tokens=...)parameter only constrains message history retrieval -- thepeer_representationandpeer_cardfields grow unbounded. SettingcontextTokensin config had no effect on those blocks, which regularly hit 4000-5000+ tokens.Fix
Client-side truncation in
_honcho_prefetch(): assemble the full Honcho context block, then trim to the configuredcontext_tokensbudget with a truncation marker when needed. Factored into small helpers instead of inline logic.Test plan