Parallel agents can independently propose the same sensible action. Prevent duplicate effects where execution occurs, using trusted operation identity and concurrency controls rather than asking each agent to notice what the others are doing.
Parallel duplicate prevention needs shared authority
A duplicate action repeats a business effect that should occur once for the same logical intent. Separate it from legitimate multiple actions for different appointments, customers, or message purposes.
For a proposed executor, resolve proposals to a canonical operation or effect identity under the business rules. Atomically claim execution and retain the result. Competing proposals can receive the existing disposition without initiating another effect.
Do not use text similarity as the sole key. Equivalent proposals can use different wording, and similar wording can refer to distinct legitimate work. Use authoritative resource and intent references wherever the system supports them.
Simulate a fictional two-agent confirmation
Two agents review the same saved request and both decide to notify the customer. Their execution attempts arrive simultaneously. The notification service should recognise one intended confirmation effect and permit one send under its actual provider contract.
If the first external send succeeds but its response is lost, local locking alone may not resolve the uncertainty. Recovery needs supported provider identity or reconciliation. Document limits instead of claiming universal exactly-once delivery.
| Parallel fixture | Required invariant |
|---|---|
| Same effect proposed twice | One authorised logical execution |
| Same customer, different request | Distinct effects remain possible |
| Two workers claim together | Atomic ownership rule |
| Old proposal after correction | Stale intent rejected |
| Lost external response | Reconcile before another effect |
Inspect the destination record or message sink. A ledger that contains one row can still conceal two external sends if its write occurs after the side effect.
Keep rejected proposals diagnosable
Record which proposal was selected, which were duplicate or stale, and the authoritative outcome reference. Agents can then explain the existing result instead of treating rejection as a reason to create a new operation identity.
Central effect control adds coordination but need not serialise independent analysis. Scope uniqueness to the actual business operation. Overly broad keys can suppress legitimate repeat work, so include negative fixtures proving that distinct requests remain distinct.
This duplicate-control design is proposed. The voice integration case study describes related tool work. Pair it with single-owner business actions.
Parallel action FAQ
Can agents avoid duplicates by reading each other’s messages?
That can help awareness but does not establish atomic execution under concurrency.
Is one database row enough proof?
No. Verify the actual external side-effect count and dangerous failure windows.
Should duplicate proposals be treated as failures?
Record their disposition appropriately while preserving the one authorised outcome and avoiding unnecessary retries.