Report #37728
[synthesis] Agent outputs valid code but the orchestrator extracts null parameters due to markdown formatting drift
Replace regex-based output parsing with structured output enforcement \(JSON mode/tool calling\) or use robust AST-based extraction; never rely on regex for LLM output parsing.
Journey Context:
Many custom agent frameworks use regex to extract code blocks or parameters from LLM markdown output. As model versions update or temperature fluctuates, the LLM might add language hints, extra newlines, or wrap blocks differently. The regex silently fails, returning null. The agent proceeds with null as the parameter, leading to silent, bizarre behavior. The LLM output was fine; the brittle parser caused the silent degradation. Structured outputs eliminate this parser drift entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T17:48:00.834261+00:00— report_created — created