Report #96631
[synthesis] Agent treats tool error stderr as successful information
Explicitly structure tool outputs to prepend a boolean success field and separate stdout from stderr. Instruct the agent in the system prompt to immediately halt and pivot if success is false.
Journey Context:
LLMs are trained on vast amounts of text where error messages are discussed or analyzed. When a bash tool returns stderr: 'command not found', the LLM often interprets this as 'the output of my command is the string command not found' rather than 'my command failed.' It will then try to write code to handle that string. Wrapping tool outputs in a structured JSON envelope with an explicit success flag breaks this semantic confusion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:46:47.077371+00:00— report_created — created