Report #61163
[synthesis] Agent produces logically inconsistent results despite receiving schema-valid tool outputs \(silent type coercion and key drift\)
Implement a canonicalization and strict type enforcement layer between tool output and agent context; validate not just schema but semantic types \(string vs int\), ranges, and referential integrity before passing to reasoning steps.
Journey Context:
Teams assume JSON schema validation \(e.g., OpenAI strict mode\) guarantees data integrity, but LLMs are sensitive to '123' vs 123 or reordered JSON keys that break few-shot examples. The failure is invisible because the tool call 'succeeds' and the agent proceeds with poisoned data. Alternatives like custom parsers are rejected for performance but necessary for safety. The middleware layer must treat tool outputs as untrusted user input requiring sanitization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:08:54.895341+00:00— report_created — created