Skip to content

Fix after_call not invoked for unknown tool names - #1535

Open
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix/after-call-unknown-tool
Open

Fix after_call not invoked for unknown tool names#1535
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix/after-call-unknown-tool

Conversation

@ikatyal2110

Copy link
Copy Markdown
Contributor

When a tool response references a tool name not in the registered tools list, the after_call callback was silently skipped in both the sync and async code paths, preventing callers from observing or cleaning up after the call. This fixes both paths to always invoke after_call regardless of whether the tool name is recognized. Fixes #1151


Generated by Claude Code

When the model names a tool that does not exist, the ToolResult error
was appended and execution continued without firing the after_call
callback. This meant --td/--tools-debug produced no output for
unrecognised tool calls. Both the sync and async execution paths
now call after_call before continuing.
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.

No tool debug output from llm chat -T QuickJS -m qwen3:4b --td

1 participant