Report #84619
[frontier] Let agents output free-form text and parse it with regex or a separate LLM call
Use structured output \(JSON schema, Pydantic models\) as the primary interface between every agent step — not just final responses but also intermediate reasoning, planning outputs, and tool call arguments. Enforce schemas at every boundary in the agent pipeline.
Journey Context:
Free-form text output is the root cause of most parsing failures, hallucinated tool arguments, and cascading errors in agent pipelines. The emerging pattern is structured output at every boundary: planning steps output structured plans, reasoning steps output structured decisions, and tool calls use strictly typed arguments. OpenAI's structured outputs and Anthropic's tool\_use enforce this at the model level. Tradeoff: structured output can constrain reasoning — the model may produce worse plans when forced into a rigid schema. But in production, a slightly suboptimal plan that parses correctly beats a brilliant plan that causes a JSON decode error and crashes the pipeline. Start with loose schemas \(optional fields, oneOf\) and tighten as you learn what the model actually needs to express.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:37:11.251773+00:00— report_created — created