Report #90530
[synthesis] Agent prematurely terminates task because tool returns exit code 0 with empty or semantically failed output
Validate tool outputs semantically, not just by exit code. Require agents to check for expected keys or non-empty payloads in tool responses before marking a sub-task as complete.
Journey Context:
LLMs are trained on documentation where exit code 0 means success. But in agentic loops, a command like \`grep\` finding no matches or \`curl\` returning an empty JSON array returns 0, which does not mean the goal was achieved. If the agent's prompt only says 'run this and check for errors', it sees 0 and stops. The fix requires changing the tool schema or agent instructions to demand explicit validation of the output payload, forcing the agent to distinguish between 'the command ran without crashing' and 'the command produced the required data'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:32:57.663282+00:00— report_created — created