Repository navigation
cli: don't warn about toolsets provided by enabled plugins - #112840
Closed
bartekczerwinski wants to merge 1 commit into
Closed
bartekczerwinski wants to merge 1 commit into
bartekczerwinski wants to merge 1 commit into
Conversation
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.
|
The allow-list here appears to conflate plugin IDs with toolset names. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With a plugin that registers its own toolset, every CLI launch prints:
The toolset is enabled, listed by
hermes tools listas✓ 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:So
validate_toolset()returnsFalsefor every plugin toolset name.Why it is only noise — and still worth fixing
self.enabled_toolsets = toolsetsis assigned before the check and nothing is filtered;invalidonly feeds the message. The plugin's tools are registered independently (they are inTOOL_TO_TOOLSET_MAPafterimport 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
plugins.enabled: [rejestracje, slipbox]— warning gone,enabled_toolsetsunchanged-t slipbox,rejestracje,nosuchthing— still printsWarning: Unknown toolsets: nosuchthingTested on the affected path by stopping the CLI immediately after
_init_toolsets()and dumping the resolved list, on 0.21.0 / CPython 3.14.