Confirmed carts stay confirmed
Two changes to the order tool and order_status, both about a cart that has already been confirmed.
A confirmed cart is never reported as expired. Polling a build whose cart was confirmed used to answer cart_expired with "nothing was charged", even while the order was still being placed. It now answers with placement, the same object order_status returns for an orderId, and no build:
{
"action": "status",
"placement": { "status": "placing", "orderId": "ord_7c21e4b9a0d3" },
"userMessage": "That order was already confirmed and is being placed, so I won't start another one."
}
A replayed build with the same idempotencyKey answers the same way, with "idempotency": "replay". cart_expired now means only what it says: the cart was never confirmed, or its order failed or was refunded.
A new build waits for a paying order. While an order is confirmed and paying at a store, a build for the same user at that store answers order_in_progress with that order's orderId. Nothing is built and nothing is charged.
Why it matters
An agent told "nothing was charged" while the card was held will offer to start again, and the person ends up with two orders and two charges. Your agent now hears that the first order is still going, and which one it is.
What to do
If your code reads build.status from a status answer, also read placement when it is present, and poll order_status with its orderId for the outcome. When order_in_progress carries an orderId, poll that order instead of building again. Agents that relay userMessage and follow assistantInstruction need no change. See order_status output.
Breaking changes
None. The answers that changed were wrong before: they said a cart had expired while its order was being placed.