Report #41040
[architecture] Downstream agent crashes on invalid input because upstream agent output was not verified
Insert a programmatic validation gate \(e.g., AST parser for code, JSON schema validator for data\) between agents. If validation fails, route back to the upstream agent with the specific validation error for a self-correction retry.
Journey Context:
Relying on the LLM to 'just output valid code/JSON' fails at non-trivial scales. An LLM might forget a closing bracket or hallucinate a non-existent API method. Sending broken output to the next agent causes unhandled exceptions. Programmatic validation provides a deterministic check. If it fails, feeding the exact validation error back to the generating agent allows it to self-correct, creating a robust feedback loop without human intervention.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:21:20.042419+00:00— report_created — created