A request using server tools comes back with stop_reason pause_turn. What should your code do?
Why B is the answer
Send the assistant content back to continue
pause_turn means a server-tool loop reached its iteration limit. Send the assistant content back and the work continues.
In detail
- pause_turn means a server-tool loop reached its iteration limit.
- It is not a failure. Send the assistant content back, and the work continues.
- Handle pause_turn in the same loop as your other stop reasons.
Use case
An illustrative scenario, not a real incident.
A research app uses a server tool that runs for many iterations. A response arrives with pause_turn. Sending the assistant content back lets the work continue where it stopped.
See it in different ways
flowchart LR
A{"stop_reason"} -->|"end_turn"| B["Use the answer"]
A -->|"tool_use"| C["Run tools, send results"]
A -->|"max_tokens"| D["Reply was cut off"]
A -->|"pause_turn"| E["Send content back to continue"]
A -->|"refusal"| F["Handle the refusal"]stateDiagram-v2 [*] --> Response Response --> Complete: end_turn Response --> RunTool: tool_use Response --> CutOff: max_tokens Response --> Blocked: refusal Response --> Continue: pause_turn Continue --> Response: send content back
stateDiagram-v2 state "Server tool loop" as s0 state "pause_turn" as s1 state "Finished" as s2 [*] --> s0 s0 --> s1: iteration limit reached s1 --> s0: send content back s0 --> s2: end_turn s2 --> [*]
Key point: pause_turn means continue, not failure.
Why the other options are wrong
- A. Wait 24 hours for a batch result
- Batches are unrelated to this stop reason.
- C. Report a failure to the user
- The request has not failed.
- D. Remove the server tools from the request and try the same prompt again
- Removing the tools throws away progress and the capability.

