How a Two-Queue Tool Bus Can Prevent Double-Commits in AI Agent Retries
A software architect discovered a duplicate-ticket bug after an AI planner retried a tool call it presumed had failed, when in fact the worker had already committed the action before crashing. The core problem stems from at-least-once delivery queues and crash-stop workers, where planner timeouts are misread as clean failures rather than ambiguous unknowns. The proposed fix centers on a stable intent ID minted before any external call, with a dedicated outbox serving as the sole authority that authorizes side-effecting operations. Workers must perform a compare-and-set state transition before executing, and results must be keyed by intent ID and generation to prevent stale responses from corrupting the plan. The architecture review argues that skipping any of these four constraints under schedule pressure creates the exact failure conditions that produce silent double-commits in production.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in