Cancellation requests, committed changes, subscription updates, and refunds require different evidence before an agent can tell a customer the job is done.
Consider a hypothetical coffee-subscription order: an AI assistant buys one regular bag, one decaf bag, and a mug with the first delivery. Before dispatch, the customer says: “Cancel the decaf in this delivery. If that works, remove it from future deliveries too. Keep everything else.” The assistant submits a cancellation request and receives an acknowledgment. Can it say “Done”? Not yet.
A single customer instruction now spans at least three operations: a current-order modification, a conditional subscription change, and a possible financial adjustment. Each has its own authority, execution state, and recovery path. The difficulty is not understanding the sentence; it is proving what happened.
An experimental cancellation test exposed the risk. One unit had been dispatched, but its outcome was unknown. A second unit awaited merchant approval. When that approval arrived, the simulator accidentally dispatched the unresolved unit again: three dispatches instead of two. This was a defect in an author-controlled simulator, not an incident involving a merchant or a live order. But it shows how an approval event can inadvertently become a retry decision.
Four questions before an agent says “Done”
These are distinct evidence requirements, not necessarily four API calls. A merchant may answer several in one response.
| Question | Evidence the agent needs |
|---|---|
| Was the request received? | A recorded request reference and acknowledgment |
| Did the merchant approve it? | An authoritative decision for the requested cancellation |
| Did the order change? | Confirmation that decaf was removed from this delivery |
| Did the financial adjustment finish? | The linked refund status, amount, currency, and destination |
The buyer’s authority is a separate gate. Permission to purchase a subscription does not automatically authorize ending the relationship, accepting store credit, or paying a cancellation fee. The agent must check the actual scope of the customer’s instruction.
Pending approval is not an unknown outcome
The merchant may have queued the request for review, approved it without updating fulfillment, or already removed the item while the refund remains pending. Those states require different customer messages.
Implementer feedback in the Universal Commerce Protocol (UCP) Order Modification discussion describes cancellation behavior that depends on order state, merchant settings, and payment method. Cafe24 notes that some cancellations are immediate, some require merchant approval, and post-shipment changes may become returns. These examples illustrate implementation variability rather than a universal rule.
Two kinds of waiting matter operationally: a known merchant decision still pending, and an attempted change whose execution outcome cannot be established. Calling both “pending” invites incorrect retries. A safer customer update is: “The merchant received your cancellation request. Approval is pending, and future deliveries are unchanged.”
The cart line is not always the reversible unit
Three visible products do not guarantee three independently cancellable settlement units. A merchant may need to recompute a bundle discount, shipping fee, or tax when one item is removed. Another implementation may expose independently reversible units or a pooled fallback. The platform should ask what is actually reversible instead of inferring reversibility from the cart display.
Suppose the merchant quotes a $12 refund after adjustments. That is an illustrative amount, not a protocol-derived price. The agent should preserve the quote and conditions, not promise the original item price or silently substitute store credit.
The current delivery and the subscription are different changes
The customer said “If that works,” so a future subscription modification depends on authoritative confirmation that the current-order cancellation committed. Eligibility alone is insufficient: the order can cross a fulfillment cutoff between checking and execution.
The current cancellation may succeed while the future subscription update fails. The agent must report the partial outcome and identify the next owner. If the customer demands both-or-neither behavior, independent services require an enforceable atomic mechanism or an explicitly authorized recovery arrangement. A dependency check does not create atomicity.
The future change also needs an effective date and a revised price. A subscription preview may help estimate proration or invoice effects, but a preview is not proof that a subscription update executed. Stripe documents that distinction in its billing API.
A timeout changes knowledge, not necessarily reality
A timed-out cancellation may never have reached the merchant, may be queued, or may already have committed. The timeout alone cannot distinguish these outcomes. Before dispatch, preserve the operation identity, intended change, affected order, and correlation references.
Replay only according to the provider’s actual idempotency contract. Stripe, for example, documents parameter matching and retention limits for API v1 idempotency keys. A new request identity can mean a new commercial action; a negative lookup can also be inconclusive if an operation remains in flight or a read view lags.
Until the result is established, hold the dependent subscription change. Escalation should include the original request, what was observed, what remains unknown, and the precise decision a human needs to make.
An experiment that exposed an unsafe retry
Here is what the cancellation experiment actually tested. A two-unit cancellation attempt left the first unit with an indeterminate outcome after dispatch while the second waited for a merchant decision. Approving the second triggered a second dispatch of the unresolved first unit. The problem was in the prototype executor, not in an autonomous agent or a live merchant system.
The defect was a coordination mistake in the prototype’s executor: approval processing re-selected every unfinished unit in the batch, without preserving which units had already been sent. Approval of one unit became an accidental trigger to retry another.
The regression test is N43, “approving a pending sibling never redispatches an already indeterminate unit,” in the same file. The original failing output and the corrected regression test are publicly inspectable, but they are not two runnable historical commits:
-
Before the fix: the preserved failing test output records 47 tests passing and N43 failing: approval produced 3 dispatches instead of 2. The experiment’s evidence record explains the failure. The bug was caught before the pre-fix source was committed, so this is preserved historical output, not a public pre-fix revision readers can check out. In a separate scratch reconstruction, removing the documented dispatched-unit exclusion recreated the same N43 failure; that reconstruction is not the original code.
-
The fix: dispatch intent is now journalled before execution, in a persisted list of dispatched units that is kept separate from the merchant’s decision state. Approval processing selects only units that have not already been dispatched. The indeterminate unit is excluded from approval execution and remains subject to reconciliation or an explicitly supported safe-replay decision.
-
After the fix: the fixed public commit passes 48/48, including N43. The following commands reproduce the corrected regression, not the original failing state:
git clone https://github.com/agorail-labs/mutation-safety-envelope.git cd mutation-safety-envelope git checkout 88b9602de66dea991c4ec923748b33766f364e99 cd experiments/ucp-cancellation npm ci && npm test The boundary matters: the bug and fix belong to the prototype executor. The simulator uses the published Mutation Safety Envelope admission gate for pre-dispatch dependency checks: test N23 refuses a change with a missing required unit, and N24 shows that passing admission does not grant merchant approval. MSE does not provide retry protection. That comes from the simulator’s persisted dispatch history. The experiment establishes neither production safety nor behavior at a real merchant or payment provider.
The generalizable rule is simple: approval must identify the exact work it authorizes. “Some work is unfinished” is not permission to dispatch everything again. This is the sort of failure scenario that should be exercised before agents are allowed to modify live orders.
A canceled item is not a completed refund
Suppose reconciliation confirms that the decaf was removed and a $12 refund was initiated. Order modification has committed; money movement has not necessarily finished. Payment providers distinguish pending, succeeded, and failed refund outcomes. An accurate message is: “The decaf was canceled; the $12 refund is still pending.”
Order, processor, and recurring-billing systems provide different pieces of evidence. A trustworthy agent should assemble those pieces rather than flattening them into a single success flag.
Where UCP stands — and what it does not yet guarantee
UCP’s published Order capability describes post-purchase order representation, fulfillment, adjustments, retrieval, and lifecycle events. A declared management scope should not be interpreted as a guaranteed standardized cancellation endpoint.
The upstream picture, rechecked on 23 November 2026: the Order Modification issue #348 is closed; the cancellation-first extension proposed in PR #945 remains open and unmerged; Purchase Options PR #890 has been merged, and it covers purchase choices and subscription policy — not subscription management or lifecycle changes. Proposals and adjacent extensions do not themselves establish an approved, interoperable cancellation API.
The useful engineering question is how change attempts relate to authoritative order state, not whether a protocol label alone makes those changes safe.
Make the customer message a design test
Before exposing this workflow to an agent, ask a team to demonstrate four customer messages: merchant decision pending; cancellation outcome unknown; cancellation confirmed with refund pending; and current order changed while future deliveries remain unchanged. For each message, identify its evidence, the owner of the next action, and how the customer can check progress.
The engineering rule is concrete: merchant approval must release only the operation it approves. If another operation has already been dispatched and its result is uncertain, the approval path must not restart it. That operation needs reconciliation or a replay explicitly supported by its provider contract. Only then can the agent tell the customer which parts of the request are complete and which still need attention.

