Skip to content

fix(hermes-plugin): forward recall_exclude_uris on context recall - #6874

Open
ydflow wants to merge 1 commit into
volcengine:mainfrom
ydflow:fix/hermes-recall-exclude-uris
Open

ydflow wants to merge 1 commit into
volcengine:mainfrom
ydflow:fix/hermes-recall-exclude-uris

Conversation

@ydflow

@ydflow ydflow commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Problem

recallExcludeUris (env OPENVIKING_RECALL_EXCLUDE_URIS) is declared in the shared config schema for every harness and forwarded to the context search as exclude_uris: claude-code and codex (#5436), dsh (#5312), pi (#5368), opencode (#6850) and openclaw (#6865) all send it. The Hermes plugin does not — there is no way to exclude a subtree from automatic recall, so generated directory files (viking://agent/skills, viking://user/<uid>/skills) keep matching like ordinary content and consume the per-turn recall budget with boilerplate.

Fix

  • Add a recall_exclude_uris setting: YAML list or comma/newline string, env OPENVIKING_RECALL_EXCLUDE_URIS, unset by default. A new list parser trims, dedupes and caps entries at 200 (the server's MAX_EXCLUDE_URIS).
  • Refuse entries without the viking:// scheme: the server validates every exclude_uris entry (validate_viking_uri), so a malformed value would turn every context recall into a fallback search. Only the scheme is checked client-side — scope and path rules stay server-owned. Invalid values warn once and fall back to the default, matching the other settings.
  • Forward the list on the mode=context recall payload. exclude_uris is context-only (the server refuses it on list searches), so the search/find fallback path is intentionally unchanged.
  • Documented in CONFIGURATION.md next to the recall compression section.

Tests

tests/test_recall_exclude_uris.py (against the pinned Hermes test host):

  • YAML list and comma/newline string forms are normalized (trim, dedupe) and forwarded on the context search.
  • Unset sends nothing anywhere; the list/find fallback never receives the field.
  • Invalid shapes (number) and non-viking entries warn and fall back to off.

Notes

The shared config schema declares recallExcludeUris (env
OPENVIKING_RECALL_EXCLUDE_URIS) for every harness and forwards it to
the context search as exclude_uris: claude-code and codex (volcengine#5436),
dsh (volcengine#5312), pi (volcengine#5368), opencode (volcengine#6850) and openclaw (volcengine#6865) all
send it. The Hermes plugin does not, so configured exclusions are
impossible and generated directory files (viking://agent/skills,
viking://user/<uid>/skills, ...) keep matching like ordinary content
and consume the per-turn recall budget with boilerplate.

Add a recall_exclude_uris setting (YAML list or comma/newline string,
env OPENVIKING_RECALL_EXCLUDE_URIS, default unset). The list parser
trims, dedupes and caps entries at 200 like the server, and refuses
values without the viking:// scheme: the server validates every
exclude_uris entry (validate_viking_uri), so a malformed value would
turn every context recall into a fallback search. Invalid shapes warn
once and fall back to the default, matching the other settings.

The provider forwards the list on the mode=context recall payload.
exclude_uris is context-only - the server refuses it on list searches
- so the search/find fallback path is intentionally unchanged.

Documented in CONFIGURATION.md next to the recall compression section.
@ZaynJarvis ZaynJarvis added the agent-plugins Agent harness and plugin integrations label Nov 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-plugins Agent harness and plugin integrations

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants