promptdojo_

Trace-driven debugging — turn a 4-hour panic into a 20-minute investigation — step 6 of 9

The router does a case-sensitive lookup. The model returned the tool name as "Search" (capitalized). The registry uses lowercase keys. The lookup falls into the fallback branch and returns the string "(unknown tool)". The agent then treats that string as a real search result.

Fix line 9 so the lookup normalizes the name to lowercase before matching the registry. The script should print the real result.

Expected output:

hits for auth
The break is on line 9 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.