Multi-step tools — when one tool isn't enough — step 6 of 9
The model hallucinated a tool name — web_search — that isn't in
the registry. The current dispatch raises KeyError deep inside
the loop, which crashes the agent and loses the whole conversation.
Fix the dispatch so an unknown tool returns the string
"unknown tool: <name>" as the tool result instead. The model can
then read that and recover (it usually retries with a real tool
name).
Expected output:
unknown tool: web_search
The model hallucinated a tool name — web_search — that isn't in
the registry. The current dispatch raises KeyError deep inside
the loop, which crashes the agent and loses the whole conversation.
Fix the dispatch so an unknown tool returns the string
"unknown tool: <name>" as the tool result instead. The model can
then read that and recover (it usually retries with a real tool
name).
Expected output:
unknown tool: web_search
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.