Report #40529
[frontier] Agent outputs malformed JSON causing downstream parsing crashes and retry loops
Use constrained decoding \(outlines/guidance\) or LLM-native structured outputs to guarantee schema compliance at token generation time
Journey Context:
Regex validation of JSON output is fragile and wastes tokens on regeneration. Constrained decoding restricts the token sampler to valid schema paths \(FSM or CFG guided\), eliminating parsing failures and reducing latency by guaranteeing syntactic correctness on the first generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:30:00.859524+00:00— report_created — created