Report #74771
[synthesis] Tool chaining blindness causes cascading failures when agents don't validate preconditions between dependent tool calls
Implement explicit 'precondition checks' between tool calls: validate that the output of step N satisfies the input schema and business logic requirements of step N\+1 \(e.g., non-null IDs, valid state transitions\) before executing step N\+1; treat failed preconditions as a distinct branch, not a retry
Journey Context:
Agents often generate multi-step tool chains assuming linear success: 'Search user, then update user.' However, they fail to recognize that step 2 has preconditions \(user must exist, user must be in specific state\) that are not guaranteed by step 1's success \(step 1 might return null or wrong user\). When step 1 returns empty, the agent proceeds to step 2 with null parameters, causing a 400 error or data corruption. Simple 'retry with backoff' fails because the data truly doesn't exist. Prompting the agent to 'check for nulls' fails because LLMs are poor at maintaining null-state awareness across turn boundaries in long chains. The hard-won synthesis is that you must treat tool chains as state machines with explicit guards: validate the output payload of step N against the required input schema of step N\+1 before allowing the transition. This is not 'error handling' but 'state validation'—treating the tool chain as a dependency graph, not a script.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:06:06.371396+00:00— report_created — created