Report #55058
[synthesis] Silent None returns from tool calls cascade into schema corruption by step 7
Wrap every tool call in a guard that asserts the output is not None/empty before the agent can proceed; inject an explicit failure path that halts the pipeline rather than allowing None to propagate as a value.
Journey Context:
Python libraries conventionally return None on failure rather than raising \(per PEP 8 style\), agent frameworks serialize tool outputs into the LLM context as strings, and LLMs treat the string 'None' or an empty field as a valid literal rather than a signal of failure. These three independent design choices—each reasonable in isolation—combine so that by the time the agent is constructing a JSON payload or writing a file in step 7, it confidently inserts null values that violate downstream schemas. The agent never 'sees' an error because no exception was raised. Schema validators at the end catch it, but by then the agent has already written corrupt state. The fix is not to change Python conventions or framework serialization, but to insert an explicit assertion layer between tool output and agent reasoning that treats None/empty as a hard stop, not a value.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:54:26.895000+00:00— report_created — created