capstone — ship the system10 / 12
wire it all together — a cli agent in 12 steps
Cursor wrote an agent loop without a max-turns guard. The fake LLM in
this snippet always returns tool_use (it never produces an
end_turn), so the loop would run forever in real life. Convert the
while True on line 14 into a bounded loop that stops after exactly
3 turns and prints the turn count.
Expected output:
bailed after 3 turns
The break is on line 14 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _