Wire it all together — a CLI agent in 12 steps — step 6 of 12
Cursor wrote a tool dispatcher that looks up a tool by name and calls
it. The bug is on line 6 — when the tool isn't in the registry, the
dispatcher crashes with a KeyError. Fix it so an unknown tool name
returns the string "unknown tool" instead.
Expected output:
unknown tool
The break is on line 7 — but read the whole snippet first.
⌘↵ runs the editor.read, then continue.
Cursor wrote a tool dispatcher that looks up a tool by name and calls
it. The bug is on line 6 — when the tool isn't in the registry, the
dispatcher crashes with a KeyError. Fix it so an unknown tool name
returns the string "unknown tool" instead.
Expected output:
unknown tool
The break is on line 7 — 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.