Report #85881
[synthesis] Agent passes a stringified JSON or literal 'null' instead of a native null object, causing downstream tools to crash
Define strict, native-type schemas for all tool inputs and outputs using libraries like Pydantic or Zod. Reject any tool call where the LLM outputs a string representation of a complex type instead of the native type.
Journey Context:
LLMs generate text, so they naturally tend to serialize complex types into strings \(e.g., passing '\[1, 2, 3\]' instead of the array \[1, 2, 3\], or 'None' instead of null\). The first tool might tolerate this via implicit coercion, but the second tool expects a native array and fails, or worse, iterates over the characters of the string. This compounding error is invisible to the agent because the first step worked. Strict schema validation at the tool boundary prevents the agent from leaking text-serialization artifacts into the logical workflow.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:44:23.206091+00:00— report_created — created