hermes - ✅(Solved) Fix feat(honcho): allow section-level controls for auto-injected context [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#17412Fetched 2026-04-30 06:47:47
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #17405: feat(honcho): add context injection section controls

Description (problem / solution / changelog)

What does this PR do?

Adds contextInjection controls for the Honcho memory provider so users can choose which base-context sections are formatted into the auto-injected prompt.

This is useful for hybrid / context recall modes where users want automatic Honcho context, but do not want every session/user/AI representation block injected into the model context on every refresh.

The new config is backward compatible: all sections default to true, preserving existing behavior.

Example:

{
  "contextInjection": {
    "sessionSummary": true,
    "userRepresentation": false,
    "userPeerCard": true,
    "aiRepresentation": false,
    "aiPeerCard": false
  }
}

contextInjection can be configured at the root or under hosts.<host>. Host values override root values per key.

This only controls formatted base-context injection. It does not disable Honcho tools, message saving, dialectic supplements, or necessarily underlying prefetch calls. Users who want no automatic injection should continue to use recallMode: "tools".

Related Issue

Resolves #17412

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • plugins/memory/honcho/client.py
    • Adds contextInjection defaults and parsing.
    • Supports root + host-level config with host per-key overrides.
    • Ignores unknown keys and non-object values safely.
  • plugins/memory/honcho/__init__.py
    • Applies section-level gates when formatting first-turn/base Honcho context.
  • tests/test_honcho_client_config.py
    • Adds config parsing coverage.
  • tests/honcho_plugin/test_session.py
    • Adds formatter behavior coverage.
  • Honcho docs updated with config examples and semantics.

How to Test

python -m py_compile plugins/memory/honcho/client.py plugins/memory/honcho/__init__.py
python -m pytest tests/honcho_plugin tests/test_honcho_client_config.py -q -o 'addopts='
git diff --check origin/main..HEAD

Result locally:

283 passed, 1 warning

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this feature
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes
  • I've tested on my platform: Ubuntu/Linux, Python 3.12

Documentation & Housekeeping

  • I've updated relevant documentation
  • I've updated cli-config.yaml.example if I added/changed config keys — N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — N/A
  • I've considered cross-platform impact — config parsing / prompt formatting only
  • I've updated tool descriptions/schemas if I changed tool behavior — N/A

Changed files

  • optional-skills/autonomous-ai-agents/honcho/SKILL.md (modified, +34/-3)
  • plugins/memory/honcho/README.md (modified, +33/-1)
  • plugins/memory/honcho/__init__.py (modified, +9/-5)
  • plugins/memory/honcho/client.py (modified, +31/-0)
  • tests/honcho_plugin/test_session.py (modified, +89/-0)
  • tests/test_honcho_client_config.py (modified, +111/-0)
  • website/docs/user-guide/features/memory-providers.md (modified, +15/-0)
RAW_BUFFERClick to expand / collapse

Feature request

Allow Honcho memory provider users to choose which first-turn context sections are auto-injected into the system prompt.

Motivation

Honcho's automatic context injection is useful, but some deployments need finer control over prompt budget and context noise. Today users can choose broad recall modes, but there is no section-level way to keep useful high-signal context while disabling lower-signal generated sections.

For example, a user may want to keep the session summary and peer card visible, while relying on Honcho tools for deeper recall instead of always injecting full user/AI representations.

Proposed behavior

Add a backwards-compatible contextInjection configuration object with per-section booleans for:

  • sessionSummary
  • userRepresentation
  • userPeerCard
  • aiRepresentation
  • aiPeerCard

All sections should default to enabled so existing users see no behavior change unless they opt in.

Related PR

Implementation: #17405

extent analysis

TL;DR

Implement a contextInjection configuration object to allow users to selectively enable or disable specific context sections for auto-injection into the system prompt.

Guidance

  • Review the proposed contextInjection configuration object and its per-section booleans to understand the intended behavior.
  • Examine the implementation in PR #17405 to see how the configuration object is used to control context injection.
  • Consider testing the new configuration object with different section combinations to ensure the desired behavior.
  • Evaluate the backwards compatibility of the proposed solution to ensure existing users are not affected unless they opt in.

Example

No code snippet is provided as the issue does not contain specific code details.

Notes

The solution relies on the implementation details in PR #17405, which should be reviewed carefully to ensure correct behavior.

Recommendation

Apply workaround by implementing the proposed contextInjection configuration object, as it provides the necessary fine-grained control over context injection without disrupting existing users.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING