# Result Subtype

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

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** error_max_turns, error_max_budget_usd, error_during_execution, Claude Agent SDK Result Subtype

## Think of it like

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

## 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.

## 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.

## Common mistake

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

## Three principles

- **success.** Finished.
- **error_max_*.** A limit was hit.
- **Check it first.** Then read result.

## Related terms

- [ResultMessage](https://learn.benibix.com/term/ai/sdk-result-message)
- [maxTurns Option](https://learn.benibix.com/term/ai/max-turns-option)
- [maxBudgetUsd Option](https://learn.benibix.com/term/ai/max-budget-usd-option)
- [outputFormat Option](https://learn.benibix.com/term/ai/output-format-option)

---

Source: https://learn.benibix.com/term/ai/result-subtype
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
