Report #76875
[synthesis] Agent silently proceeds after tool returns None or empty result instead of raising an error
Design all agent tools with explicit success/failure return schemas — never return None, empty string, or empty list on failure. Raise structured exceptions the agent must acknowledge, or return a typed Result object with a mandatory status field the agent prompt forces it to check before proceeding.
Journey Context:
LLMs treat absence of output as absence of problem. In traditional code, a None return from a function expecting data causes a downstream crash — a useful signal. Agents interpret 'no error' as 'success' and build subsequent steps on phantom data. The counterintuitive fix: tools should be MORE likely to error out, not less. A tool that fails loudly is safer than one that silently degrades. Developers often wrap tools in try/except to 'make them robust,' catching exceptions and returning empty values — this is the single most common way developers introduce compounding failure into agent systems. The tradeoff is more visible agent retries vs. silent data corruption. Always choose retries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:38:04.025918+00:00— report_created — created