promptdojo_

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 break is on line 12 — but read the whole snippet first.

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.

open this same url on a laptop to keep going today.