Skip to content

fix(cli): suppress spurious 'Unknown toolsets' warning for plugin toolsets validated before registration - #89351

Closed
dcazabat wants to merge 1 commit into
NousResearch:mainfrom
dcazabat:fix/toolset-validation-unknown-plugin-toolsets
Closed

dcazabat wants to merge 1 commit into
NousResearch:mainfrom
dcazabat:fix/toolset-validation-unknown-plugin-toolsets

Conversation

@dcazabat

Copy link
Copy Markdown

Summary

cli.py prints a spurious Warning: Unknown toolsets: a2a (and spotify) on startup even though those plugin toolsets load and work correctly moments later.

Root cause

The HermesCLI constructor validates the enabled-toolset list via validate_toolset() before plugin toolset registration runs. Plugin toolsets like a2a / spotify are registered at plugin load time (after this constructor), so they look unknown at this early point.

The existing code already excludes MCP server names from the check for exactly this reason (MCP names resolve later during discovery). Plugin toolsets are the same class of "resolves later" name, but weren't excluded.

Fix

Mirror the MCP-name exclusion: also skip toolset names recorded in config's known_plugin_toolsets (a platform → list-of-names map written by the hermes tools save flow — see hermes_cli/tools_config.py).

mcp_names = set((CLI_CONFIG.get("mcp_servers") or {}).keys())
plugin_ts_names = {
    name
    for names in (CLI_CONFIG.get("known_plugin_toolsets") or {}).values()
    for name in (names or [])
}
invalid = [
    t
    for t in toolsets
    if not validate_toolset(t)
    and t not in mcp_names
    and t not in plugin_ts_names
]

Verification

  • python3 -c "import ast; ast.parse(open('cli.py').read())" → clean.
  • Confirmed a2a is present in known_plugin_toolsets on a live config, so the warning is suppressed.
  • Confirmed the toolset is genuinely functional (not a masking of a real error): ✓ a2a connected in gateway.log and the a2a_* tools present in the session catalog.

Notes

… before plugin registration

cli.py validates the enabled-toolset list via validate_toolset() in the
constructor, before plugin toolset registration runs. Plugin toolsets like
'a2a' or 'spotify' therefore look unknown at that early moment and produce a
spurious 'Warning: Unknown toolsets: a2a' even though they register fine
moments later (confirmed '✓ a2a connected' in gateway.log).

Mirror the existing MCP-server-name exclusion: also exclude toolset names
recorded in config's known_plugin_toolsets (a platform → list-of-names map
written by the 'hermes tools' save flow). Those are plugin-provided toolsets
that legitimately resolve later in startup.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists labels Aug 18, 2026
@alt-glitch

Copy link
Copy Markdown

This was generated by AI during triage.

Duplicate of #88003 for the same pre-registration plugin-toolset warning mechanism.

@teknium1

Copy link
Copy Markdown
Collaborator

The Unknown-toolsets startup warning now exempts plugin toolset keys via get_plugin_toolset_keys_nowait() (#116425 salvaged).

Superseded by #118841 (merge 74f726c), which credits this PR. Closing.

@teknium1 teknium1 closed this Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants