promptdojo_

The code reads response["content"][0]["text"]. The model returned a tool_use block FIRST, then a text block. So content[0] is the tool_use — which has no text key. The code raises KeyError.

Fix the code to FILTER for text blocks first, then read the text. Use the comprehension pattern from step 5.

Expected output:

found.
The break is on line 10 — 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.