promptdojo_

What a harness is — the four layers under every coding agent — step 7 of 9

The harness has the tool registry hardcoded INSIDE the loop. Adding a new tool means editing the loop function — not a module-level dict. After three new tools, the loop body is unreadable.

Fix dispatch(tool_use, tools) to take the registry as an argument instead of hardcoding it. Then pass the registry in from outside.

Expected output:

hits for tokyo
The break is on lines 1, 7 — but read the whole snippet first.

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