What
When the maxBudgetUsd option is set, which caps how much a session may spend, Claude Code now marks that a spending cap is in place so its tools can check for it.
Why
This lets features behave differently when a budget cap is set. Nothing yet uses it in a way you would notice.
Names in the bundlemaxBudgetUsd
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on How the agent loop works touched a line naming maxBudgetUsd after this was published.
You can cap the loop with `max_turns` / `maxTurns`. Count each turn with tool calls, plus one for the final text-only response. Without that extra turn, the run ends with a `ResultMessage` of subtype `error_max_turns` and no final response…agent-sdk/agent-loop see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
A small documentation edit on How the agent loop works touched a line naming maxBudgetUsd after this was published.