Follow Discord
Sweep 09 Oct 2026 · 17:27Z Build v2.1.296 517 read Stable v2.1.287 Latest v2.1.296 Next v2.1.296 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Get structured output from agents changedagent-sdk/structured-outputs

Nearest release: v2.1.251, published 8 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 29 Aug 2026 00:00 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 28 Sep 2026 23:37 UTC.

Upstream edited
Recorded here
Lines+3added
Lines−3removed
From line 378 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits6to this page, all time

The whole hunk

from line 378, old and new numbered
/
lines
from line 378
378378 
379379When an error occurs, the result message has a `subtype` indicating what went wrong:
380380 
381| Subtype | Meaning |
382| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
383| `success` | Output was generated and validated successfully |
381| Subtype | Meaning |
382| - | - |
383| `success` | Output was generated and validated successfully |
384384| `error_max_structured_output_retries` | No valid output remained after multiple attempts (validation failures, or a model-fallback retraction with no successful retry) |
385385 
386386A result can also end with subtype `success` but no `structured_output` value, for example when the run completes without the agent producing a structured output. Treat that case as a failure as well. The troubleshooting entry [structured\_output is None but the result says success](/docs/en/agent-sdk/troubleshooting#structured_output-is-none-but-the-result-says-success) covers this case. The example below treats a result as successful only when the `subtype` is `success` and `structured_output` is present, and handles every other result as a failure:
Feedback