Under the hoodTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
SDKArea: what it touches
Internal ChangesKind: in v2.1.285,
Internal ChangesSection of the release
Unclear It is not clear how maxTurns values are changed by normalizing, or how the tracked errors show up in SDK output.
What
The SDK is the library for running Claude Code from your own programs. The maxTurns option caps how many turns a run may take, and Claude Code now normalizes this value into a standard form before using it.
The SDK's output stream also now keeps track of two things:
whether a turn ended without the model being called
any error text that came before such turns
Why
This affects how errors are reported to programs that use the SDK.
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.
Confirmed sinceAnthropic's documentation has since written up maxTurns, on migration.| `max_turns` (typescript: `maxTurns`) | Count turns client-side. |managed-agents/migrationsee the edit
Added sinceA small documentation edit on Create custom subagents touched a line naming maxTurns after this was published.* When a subagent stops at its [`maxTurns`](#supported-frontmatter-fields) limit, Claude Code marks the returned output as partial, and Claude can resume the subagent to continue its work.sub-agentssee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear how `maxTurns` values are changed by normalizing, or how the tracked errors show up in SDK output.
Anthropic's documentation agreesA small documentation edit on Create custom subagents touched a line naming maxTurns after this was published.