promptdojo_

stop_reason, tool_use, tool_result — the loop every agent runs — step 6 of 9

The agent loop built a tool_result with a hardcoded tool_use_id of "1", but the model emitted "toolu_42". The fake server raises a ValueError on mismatch. Fix line 9 so the id is read from the tool_use block dynamically.

Expected output:

matched
The break is on line 9 — but read the whole snippet first.

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