Report #92977
[synthesis] Tool output violates JSON schema but agent treats malformed data as ground truth, poisoning subsequent reasoning steps \(context poisoning\)
Enforce strict boundary validation using JSON Schema with "additionalProperties: false" and semantic type checking before injecting tool results into context; reject non-conforming outputs at the boundary to prevent adversarial-like poisoning
Journey Context:
Default error handling in agent frameworks often appends raw error strings or malformed outputs to context, which agents interpret as valid data. Synthesizing Toolformer output analysis with LangChain error handling patterns reveals that schema-violating outputs act as adversarial examples when appended to chain-of-thought, causing gradual reasoning corruption. Standard type coercion \(numbers becoming strings\) or silent truncation creates cascading failures. Strict boundary validation with additionalProperties: false prevents poison from entering the reasoning chain entirely, unlike permissive parsing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:38:59.493072+00:00— report_created — created