Skip to content

fix(honcho): reject whitespace-only honcho_search and honcho_reasoning queries - #11256

Closed
fjlaowan1983 wants to merge 1 commit into
NousResearch:mainfrom
fjlaowan1983:fix/honcho-whitespace-tool-queries
Closed

fix(honcho): reject whitespace-only honcho_search and honcho_reasoning queries#11256
fjlaowan1983 wants to merge 1 commit into
NousResearch:mainfrom
fjlaowan1983:fix/honcho-whitespace-tool-queries

Conversation

@fjlaowan1983

Copy link
Copy Markdown
Contributor

Summary

  • Validate query for honcho_search and honcho_reasoning with (args.get("query") or "").strip() before calling Honcho APIs.
  • Prevents whitespace-only strings (e.g. spaces/tabs/newlines) from being treated as a real query; returns the same tool_error shape as an empty query: Missing required parameter: query.
  • Adds regression tests in tests/honcho_plugin/test_session.py (TestConcludeToolDispatch) asserting the backend methods are not invoked for whitespace-only input.

Context

Related upstream discussion / radar: #11192 (fix(honcho): reject whitespace-only tool queries).

Test plan

  • python -m pytest tests/honcho_plugin/test_session.py::TestConcludeToolDispatch -v -o addopts=

Noticed this while setting up uv on Windows WSL2 — trivial guard, but it avoids pointless Honcho calls when the model sends blank queries.

Strip query before validation; add regression tests (aligns upstream NousResearch#11192).

Made-with: Cursor
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels Apr 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #11192 — same fix: reject whitespace-only queries for honcho_search and honcho_reasoning.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused regression fix. The premise remains current: honcho_search forwards any truthy query to search_context at plugins/memory/honcho/__init__.py:1340-1347, and honcho_reasoning does the same for dialectic_query at plugins/memory/honcho/__init__.py:1353-1362; whitespace-only strings are truthy. The proposed normalization returns the existing required-parameter error before either backend call.

The change is scoped to the two required-query tools. The nearby honcho_conclude path already uses .strip() normalization at plugins/memory/honcho/__init__.py:1388-1390, so this follows established plugin behavior. The PR diff's two regression tests assert both the error shape and that the respective manager method is not invoked.

Automated hermes-sweeper review.

@teknium1 teknium1 added the sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users label Jul 12, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Merged via #66052 (rebase-merge) — your commit landed on main with your authorship preserved. The honcho_search half had been independently fixed by #62290; your honcho_reasoning whitespace guard and regression tests are now live. Thanks @fjlaowan1983!

@teknium1 teknium1 closed this Jul 17, 2026
@teknium1 teknium1 added the area/memory Memory subsystem: store, providers, sync, background reviews label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/memory Memory subsystem: store, providers, sync, background reviews comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants