Report #62665
[frontier] Agent reasoning outputs are unpredictable and impossible to build reliable downstream logic on
Use structured output schemas \(JSON Schema via function calling or structured outputs APIs\) for agent planning steps, not just for tool calls. Define explicit schemas for the agent's plan, its self-assessment, and its decision to terminate—then branch your control flow on the parsed structured output, not on free-form text.
Journey Context:
Everyone uses structured outputs for tool calls, but the frontier pattern is using them for the agent's internal reasoning: 'what is my plan?', 'am I done?', 'what should I do next?' all become typed objects with constrained values. This makes agent behavior programmatically inspectable and composable—you can write unit tests against plan objects, branch control flow on enum values, and catch degenerate plans before execution. Free-form chain-of-thought is great for the model's internal reasoning but terrible as an API contract. The tradeoff: over-constraining schemas can prevent the model from expressing nuanced plans. The solution is to keep schemas flexible at the leaves \(string fields for reasoning\) but structured at the branches \(enums for decision type, typed fields for parameters\). OpenAI's structured outputs and Anthropic's tool\_use both support this pattern natively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:40:07.165274+00:00— report_created — created