Report #49401
[synthesis] Agent enters degenerate loop generating invalid JSON after minor syntax error
Implement a deterministic JSON parser with a repair pre-processor, and never feed raw parser errors back to the agent; instead, provide a structured schema error summary.
Journey Context:
If an agent misses a comma in a large JSON output, the parser throws a syntax error with a line number. Feeding this raw error back causes the LLM to over-correct, often escaping valid quotes or breaking the structure further. This compounding formatting error crashes the orchestrator. By intercepting the error and using a repair library before passing to the next step, the agent loop continues smoothly without the LLM trying to play character-level parser.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:24:16.787222+00:00— report_created — created