A subagent returns its result as unstructured prose. The coordinator f — Claude Certified Architect – Foundations Practice — Claude Cert Academy

A subagent returns its result as unstructured prose. The coordinator fails to parse it reliably. What is the most effective fix?

Answer: Enforce a structured output schema using response_format so the API rejects non-conforming responses before they reach the coordinator

Programmatic enforcement via response_format is the most reliable fix for structured output problems. Prompt instructions can drift under distribution shift — the model may follow them most of the time but fail on edge cases. Schema enforcement via the API rejects non-conforming responses before they reach your coordinator, eliminating the parsing failure class entirely. A try/except handles the symptom but not the cause.

Continue to Claude Cert Academy