Reading the response — content blocks, stop_reason, usage — step 7 of 9
Cursor wrote this loop with if response["stop_reason"] == "stop":.
But Anthropic's actual stop reason is "end_turn", not "stop".
The condition never fires; the loop runs to its iteration cap and
returns "capped" even though the model finished cleanly on turn 1.
Fix the comparison to use the correct stop_reason string.
Expected output:
result: done in 1 turns
Cursor wrote this loop with if response["stop_reason"] == "stop":.
But Anthropic's actual stop reason is "end_turn", not "stop".
The condition never fires; the loop runs to its iteration cap and
returns "capped" even though the model finished cleanly on turn 1.
Fix the comparison to use the correct stop_reason string.
Expected output:
result: done in 1 turns
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.