Report #88734
[frontier] Agents produce invalid tool arguments breaking downstream APIs due to loose output constraints
Use strict JSON Schema as state machine contracts: define Pydantic models that represent valid state transitions, and use structured output APIs to enforce these schemas at the LLM level
Journey Context:
Free-text parsing or loose JSON causes agents to emit invalid actions \(e.g., 'status: donex' instead of 'done'\). Treat the agent's output as a state machine transition: define schemas where 'action' enum values determine allowed next states. Use OpenAI/Anthropic structured output with strict=True \(or zod/pydantic validation\) so the LLM is constrained to valid transitions, eliminating parse errors and invalid state transitions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:31:24.975937+00:00— report_created — created