Report #38619
[frontier] Agent generates invalid JSON tool calls causing cascade failures in agent loops
Use structured generation with JSON schema enforced at logits level via regex-constrained decoding \(outlines/vLLM\) instead of post-hoc validation or prompt engineering
Journey Context:
Post-hoc validation fails because LLMs don't reliably 'fix' malformed JSON; constrained decoding guarantees syntactic correctness by masking invalid tokens during generation. Tradeoff: slight latency increase vs elimination of parse-error crashes. Alternatives: OpenAI function calling \(vendor lock-in, limited models\), retry loops \(brittle, expensive\). This is the right call because deterministic output guarantees prevent agent loop crashes that corrupt session state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:18:02.961012+00:00— report_created — created