Skip to content
BENIBIX Learn

Result Subtype

AI🧩 Claude Agent SDKSDK Messages

Also known as error_max_turns, error_max_budget_usd, error_during_execution, Claude Agent SDK Result Subtype

The field that says if a run finished, or which limit stopped it.

Think of it like

It is like the light on a washer: done, out of time, or stuck.

Example

Mia's agent sometimes stops early. She logs the subtype and sees error_max_turns, so she raises max turns.

Why it matters

An ended run is not a done task, and the subtype is how you tell them apart.

Definition

The result subtype is a field on the last message of a run. It says how the run ended. success means Claude is done. Two codes mean a limit was hit: one for turns, one for spend. Another means something broke. Only success has the text.

Common mistake

Reading result without checking the subtype. On an error it is missing.

Key takeaways

  1. 1
    success. Finished.
  2. 2
    error_max_*. A limit was hit.
  3. 3
    Check it first. Then read result.