Report #48594
[synthesis] Agent confidently proceeds after a tool returns success status but wrong state
Implement a State Verification Step pattern where the agent must execute a separate, read-only observation tool \(e.g., cat or git status\) to confirm the side effects of a mutation tool \(e.g., sed or git checkout\), rather than trusting the mutation tool's exit code.
Journey Context:
APIs and CLIs often return 0 or 200 even if the semantic intent was not achieved \(e.g., sed making no changes because the regex did not match, or a web API returning an empty JSON array\). Agents treat exit codes as ground truth. The synthesis here is combining REST API semantics with agent planning: an agent's plan must treat mutation as unverified until an independent observation confirms it. The tradeoff is doubling the tool calls \(higher latency and cost\) for drastically reduced compounding errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:03:03.675686+00:00— report_created — created