promptdojo_
Checkpoint

One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.

Last one. The starter has a trace and a partial find_first_bad_turn function. The function should return the n value of the first turn whose stop_reason is NOT tool_use and NOT end_turn. Right now it returns None. Finish the body so it returns the right turn number.

Expected output:

3

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.