Skip to content

fix(honcho): filter deriver noise and label dialectic context injection#25344

Open
ayushere wants to merge 3 commits into
NousResearch:mainfrom
ayushere:fix/honcho-dialectic-noise-injection
Open

fix(honcho): filter deriver noise and label dialectic context injection#25344
ayushere wants to merge 3 commits into
NousResearch:mainfrom
ayushere:fix/honcho-dialectic-noise-injection

Conversation

@ayushere

@ayushere ayushere commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • In HonchoMemoryProvider.prefetch(), the dialectic result was appended raw to parts with no label and no validation, so deriver-style non-responses like "Nothing to save. Two greeting exchanges, no work done." got injected verbatim as <memory-context>, causing the main LLM to echo that text instead of answering the user.
  • The fix discards known deriver noise patterns (startswith "nothing to save", "no new information", "no information", or short "nothing …" strings) before injection, and labels valid results with a ## Honcho Contextual Analysis heading so the LLM can distinguish memory context from user input.

Root cause

_run_dialectic_depth() occasionally returns deriver-style housekeeping strings instead of actionable memory context, especially on sparse sessions (few turns, greeting-only exchanges). These strings passed the existing dialectic_result.strip() guard and were appended without sanitization. The main model received the <memory-context> block containing the non-response, matched its instructed pattern of "answer what's in context," and reproduced the noise string verbatim as its reply — breaking the persona entirely for that turn.

Test

  1. Configure the agent with a Honcho memory provider.
  2. Start a new session and send only 1–2 short greeting messages (sparse context).
  3. Trigger prefetch() so _run_dialectic_depth() fires.
  4. Before the fix: the agent's next reply is something like "Nothing to save. Two greeting exchanges, no work done.".
  5. After the fix: deriver noise is silenced; the agent replies normally. Valid dialectic results appear under the ## Honcho Contextual Analysis heading in the injected context.

Copilot AI review requested due to automatic review settings May 14, 2026 01:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Filters out deriver-style non-response strings from Honcho dialectic results and wraps valid results with a markdown header.

Changes:

  • Adds heuristic filter for "nothing to save", "no new information", etc.
  • Prepends ## Honcho Contextual Analysis header to valid dialectic output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/memory/honcho/__init__.py Outdated
Comment on lines +677 to +683
_dr = dialectic_result.strip().lower()
_is_deriver_noise = (
_dr.startswith("nothing to save")
or _dr.startswith("no new information")
or _dr.startswith("no information")
or (_dr.startswith("nothing") and len(_dr) < 120)
)
Comment thread plugins/memory/honcho/__init__.py Outdated
_dr.startswith("nothing to save")
or _dr.startswith("no new information")
or _dr.startswith("no information")
or (_dr.startswith("nothing") and len(_dr) < 120)
Comment thread plugins/memory/honcho/__init__.py Outdated
Comment on lines +677 to +684
_dr = dialectic_result.strip().lower()
_is_deriver_noise = (
_dr.startswith("nothing to save")
or _dr.startswith("no new information")
or _dr.startswith("no information")
or (_dr.startswith("nothing") and len(_dr) < 120)
)
if not _is_deriver_noise:
or (_dr.startswith("nothing") and len(_dr) < 120)
)
if not _is_deriver_noise:
parts.append(f"## Honcho Contextual Analysis\n{dialectic_result.strip()}")
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers labels May 14, 2026
- Move noise-phrase list to module-level constant _DERIVER_NOISE_PHRASES
  with a comment explaining origin (deriver prompt wording) and why
  bare startswith('nothing') is excluded to avoid false positives
- Replace magic inline tuple with any(startswith) against the constant
- Rename local vars _dr -> normalized, _is_deriver_noise -> is_deriver_noise
  (underscore prefix is unconventional for ordinary locals)
- Add 'no relevant information', 'nothing relevant', 'nothing notable'
  to cover likely phrasing variants
@ayushere ayushere force-pushed the fix/honcho-dialectic-noise-injection branch from 25ee528 to 881553f Compare May 15, 2026 01:42
@ayushere ayushere force-pushed the fix/honcho-dialectic-noise-injection branch from 881553f to 7b74895 Compare May 15, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants