Skip to content

fix: surface tool load errors in get_tool fallback - #1845

Open
vanja-emichi wants to merge 1 commit into
agent0ai:mainfrom
vanja-emichi:fix/tool-load-error-visibility
Open

fix: surface tool load errors in get_tool fallback#1845
vanja-emichi wants to merge 1 commit into
agent0ai:mainfrom
vanja-emichi:fix/tool-load-error-visibility

Conversation

@vanja-emichi

Copy link
Copy Markdown
Contributor

Problem

Agent.get_tool silently swallows any exception raised while loading a tool module and falls back to the Unknown tool. When a plugin tool fails
to import (e.g. a stale module cache or a missing symbol), the only visible symptom is
the generic "tool not found" message, which sends users debugging the tool name
instead of the actual import error.

I hit exactly this while developing a plugin: a helper module cached in sys.modules

get_tool silently swallows exceptions raised while loading a tool
module and falls back to the Unknown tool. When a plugin tool fails
to import (e.g. a stale module cache or a missing symbol), the only
visible symptom is the generic 'tool not found' message, which sends
users debugging the tool name instead of the actual import error.

Log the failing path and error to the console before continuing to
the next candidate, so the real cause is visible at dispatch time.
No behavioral change otherwise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant