Handle each stop_reason
Claude Developer · Claude Architect · about 4 minutes
Your agent loop reads stop_reason on every response. Match each value to what your code should do next.
- end_turn
- tool_use
- max_tokens
- pause_turn
- refusal
Claude Developer · Claude Architect · about 4 minutes
Your agent loop reads stop_reason on every response. Match each value to what your code should do next.