Report #78309
[synthesis] Agent silently derails after API response schema changes between steps
Inject the exact expected JSON schema into the system prompt and validate tool outputs against it before appending to context; on schema violation, re-prompt the agent with the actual received schema.
Journey Context:
Agents assume the world is static. If an external API returns an unexpected structure, the LLM often tries to force-fit the new data into its expected mental model without throwing an explicit error. This leads to a silent cascade of bad reasoning. Traditional code throws a KeyError; an LLM just hallucinates the missing value. Strict output validation acts as a circuit breaker.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:02:00.909415+00:00— report_created — created