$result->run->stopReason and normalized usage after completion so the application can distinguish a budget stop from a normal model finish.
Stopping is a bounded result, not automatically an exception. Decide which stop reasons your product treats as successful, retryable, or user-visible.Build
Stop conditions
Bound PHP agent runs by steps, tokens, cost, duration, tools, or finish reason.
Combine stop helpers to enforce product budgets independently of the model’s decision to continue.
The SDK also provides tool-call and finish-reason conditions. Inspect
Last modified on July 26, 2026