Skip to content

cli: don't warn about toolsets provided by enabled plugins - #112840

Closed
bartekczerwinski wants to merge 1 commit into
NousResearch:mainfrom
bartekczerwinski:fix/plugin-toolsets-unknown-warning
Closed

bartekczerwinski wants to merge 1 commit into
NousResearch:mainfrom
bartekczerwinski:fix/plugin-toolsets-unknown-warning

Conversation

@bartekczerwinski

Copy link
Copy Markdown

Problem

With a plugin that registers its own toolset, every CLI launch prints:

Warning: Unknown toolsets: slipbox, rejestracje

The toolset is enabled, listed by hermes tools list as ✓ enabled, and its tools work.

Cause

_init_toolsets() validates the toolset list before the plugin registry has been walked. That walk happens later, inside _get_platform_tools(). Measured at the point of the check:

enabled_toolsets: [... 'rejestracje', ... 'slipbox', ...]   # list intact
plugin_toolset_names: []                                    # registry still empty

So validate_toolset() returns False for every plugin toolset name.

Why it is only noise — and still worth fixing

self.enabled_toolsets = toolsets is assigned before the check and nothing is filtered; invalid only feeds the message. The plugin's tools are registered independently (they are in TOOL_TO_TOOLSET_MAP after import model_tools), so the agent reaches them normally.

But it reads as a misconfiguration, and it is timing-dependent: which plugin names appear depends on how far registration has got, so the same setup can name one plugin on one launch and two on the next.

Fix

MCP server names hit exactly this ordering problem and the code already skips them, with a comment saying so. This does the same for names in plugins.enabled.

Verified

  • with plugins.enabled: [rejestracje, slipbox] — warning gone, enabled_toolsets unchanged
  • -t slipbox,rejestracje,nosuchthing — still prints Warning: Unknown toolsets: nosuchthing

Tested on the affected path by stopping the CLI immediately after _init_toolsets() and dumping the resolved list, on 0.21.0 / CPython 3.14.

Every CLI launch with a plugin that registers its own toolset prints

    Warning: Unknown toolsets: slipbox, rejestracje

even though the toolset is enabled and its tools work. _init_toolsets()
validates before the plugin registry has been walked — that happens later, in
_get_platform_tools() — so validate_toolset() returns False for every plugin
toolset name at this point.

Nothing is actually broken: self.enabled_toolsets is assigned before the check
and the invalid list only feeds the message. The tools are registered too, so
the warning is purely noise — but it reads as a misconfiguration and it is
timing-dependent, so a user can see one plugin named on one launch and two on
the next.

MCP server names hit the same ordering problem and are already skipped here.
Do the same for names listed in plugins.enabled. A name that is neither a known
toolset, an MCP server, nor an enabled plugin still warns.
@Godhet

Godhet commented Sep 16, 2026

Copy link
Copy Markdown

The allow-list here appears to conflate plugin IDs with toolset names. plugins.enabled stores enabled plugin names, while plugin toolsets are registered separately (and a general/MCP plugin need not expose a toolset whose key equals its plugin ID). As a result, with an enabled plugin named foo that does not provide a foo toolset, -t foo will now suppress the genuine unknown-toolset warning. Could this instead validate against the discovered/persisted plugin toolset keys (or add a regression covering an enabled non-toolset plugin name), while still avoiding the registration-order warning?

@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 labels Sep 17, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

The startup Unknown-toolsets warning now exempts plugin toolset keys via get_plugin_toolset_keys_nowait() (#116425 salvaged, credit #89345); #71650 / #91757 / #95529 are closed.

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 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.

4 participants