promptdojo_
Checkpoint

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

Final drill. You have three traces from this morning's on-call queue. Each fits one of the three failure patterns from this lesson. Write classify(trace) that returns one of "loop", "bloat", "clean" based on these rules:

  • "loop" if any 3-row window has identical (tool, args)
  • "bloat" if the last turn's tokens is more than 3× the first turn's tokens
  • "clean" otherwise

(Note: routing bugs don't surface as a trace pattern alone — they need the tool result content to detect, which is out of scope here.)

Three traces run. Expected output:

loop
bloat
clean

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.