Report #29013
[synthesis] Partial state changes persist after task failure, leaving system in inconsistent state
Implement saga pattern with compensating transactions: stage all changes in temporary workspace or transaction log, validate final state against goal criteria, then commit atomically; on any step failure, execute compensating actions to undo partial changes and restore consistency.
Journey Context:
Consider an agent tasked with 'Move files A, B, C to archive and update database status'. It moves A and B successfully, fails on C due to permissions. Without saga pattern, A and B remain moved \(partial success\), database may show partial status, leaving system inconsistent. The agent may report 'Task failed' but the state change persists. Standard retry logic attempts to redo C, but A and B are already gone from source, potentially causing double-processing if retries succeed. This applies distributed systems transaction theory to agent tool use. The fix requires treating multi-step operations as sagas: each step has a compensating action \(undo\). If any step fails, run compensations for all completed steps. This ensures atomicity \(all or nothing\) despite external service unreliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:05:35.412717+00:00— report_created — created