The agent shows one total and your checkout session returns another
In short
When an AI agent displays one total and your checkout session returns another, the agent is rendering an earlier authoritative state rather than computing a wrong one. Replay the session's 4 or 5 calls in order and compare each response to what the shopper saw: the mismatch sits at the exact call whose response was never re-rendered.
Key takeaways
- Replay the call sequence before reading any pricing code — the fault is usually between 2 correct responses.
- A total that only moves once an address arrives is tax or duty resolving for the first time, and it is correct behaviour badly presented.
- Fulfilment selection is a price change. An agent that treats it as metadata will show a total that is real but incomplete.
- Return complete state on every call, including calls that changed nothing, so the agent never holds a number you did not just send.
- Carry a monotonic revision on every response. Without it, no party can tell a stale render from a current one.
The shopper saw one figure inside the assistant and your server was holding another. In practice the agent is rarely doing arithmetic — it is showing a response you sent, just not the most recent one. Almost every reported total mismatch in agent checkout resolves to a state transition the agent never re-rendered, and finding it takes a replay rather than an audit of your pricing code.
This follows from how the object works: the merchant owns the session, the agent holds a rendering, and every call returns the merchant's complete current state. That contract is described in the agentic checkout session, and the failure below is what happens when a response is technically correct and structurally easy to misuse.
Replay the calls in order, and find the response nobody rendered
- Pull every call for that session id in order, with the request body, the response body, the HTTP status and a timestamp on each. If you cannot do this from logs, stop and fix the logging: no other step here is possible without it.
- Write down the total your server returned at each step. You now have a sequence — for example 4,200 at create, 4,200 after adding a line, 4,614 once the address arrived, 4,814 after the fulfilment choice.
- Ask the agent surface, or the shopper's screenshot, which of those numbers was displayed at the moment of confirmation.
- Match it. The displayed figure will normally equal one of your earlier responses exactly, and the call immediately after it is the one whose response was dropped.
- Check that call's response for 3 things: did it return complete state or only what changed, did it carry anything the agent could use to tell it was newer, and did it include a human-readable message explaining the change.
The update that changed the total and never reached the screen
The commonest single cause. An update call succeeds, the merchant reprices, the response carries a new total, and the agent's view is not refreshed — because the change was small, because the agent batched a summary before the response landed, or because the response looked to the agent like an acknowledgement rather than new state.
You cannot fix the agent. You can make the mistake impossible to make: never return a bare acknowledgement, never return a partial object, and make every response indistinguishable in shape from a full state read. An agent that receives the same complete document every time has nothing to merge and therefore nothing to merge wrongly.
Tax and duty do not exist until an address does
This one is correct behaviour that reads as a bug. Destination tax, and duty on a cross-border order, cannot be resolved before the shipping destination is known, so the total genuinely changes at the call where the address arrives. The shopper experiences it as a price rising after they agreed to it.
- Return an explicit incomplete marker before the address is known, rather than a total that looks final. A total presented as provisional is not a surprise when it moves.
- Itemise. Subtotal, discounts, tax and shipping as separate figures let the assistant say which one changed; a single number leaves it guessing, and guessing is what produced the complaint.
- Attach a message the assistant can read aloud — "tax added for the delivery address" — because the agent will otherwise narrate a bare number change in whatever words it invents.
- Decide what an agent may see at all before an address exists. That readiness question is the subject of what has to be true before an assistant may quote price and stock, and whether agents see the same figures as shoppers is settled in should an agent see the same price a shopper sees.
A fulfilment choice is a price change wearing a different name
Shipping options are frequently modelled as a selection rather than as a priced line, and an agent that treats the selection as metadata will show a total that predates it. The same applies to any option that carries a surcharge: expedited delivery, a collection slot, gift wrapping, an oversize handling charge.
Model each option as an object with a price and conditions, return the full set on every response, and make clear which one is currently selected and what it contributes. If no option has been chosen yet, say so as a state rather than defaulting silently to the cheapest, because a silent default is a decision the shopper did not make and will not recognise.
Something moved on your side between two calls
Sessions are not instantaneous. 8 or 10 minutes can pass between an agent adding a line and completing, and your catalogue does not stand still: a promotion scheduled for 18:00 begins, a price rule expires, a supplier import lands. The agent's number was right when you sent it and wrong by the time it was confirmed.
A supplier feed landing mid-session is a particularly good example, because it changes prices nobody in the building was expecting to change that afternoon — the failure mode set out in the supplier file imported and changed things quietly. The mitigation is not to freeze the catalogue. It is to make the change legible: a revision on the session, a message on the response, and an expiry after which the quoted numbers are explicitly no longer offered.
| Replay result | Cause | Fix |
|---|---|---|
| Displayed total equals an earlier response exactly | An update response was never re-rendered | Return complete state on every call, with a revision |
| Total changed at the address call | Destination tax or duty resolved for the first time | Mark totals provisional until the address exists; itemise |
| Total changed at the fulfilment call | The selected option carries a price | Model options as priced objects; never default silently |
| No call changed the total, and it still differs | A price or promotion moved server-side between calls | Session expiry, plus a message naming what changed |
| Displayed total matches nothing you returned | The agent is quoting a feed, not the session | Compare feed and session pricing — see the catalogue access trade |
Shape the response so the agent has nothing left to compute
The instance is fixable with a patch. The class is only fixable by removing the opportunity, and that means every response — create, update, complete, cancel, and calls that changed nothing at all — returns the same complete document.
- Complete state, never a delta. Line items, fulfilment options, itemised totals, status, messages, policy links, every time.
- A monotonic revision integer on every response, plus an ISO 8601 timestamp, so any party can order 2 responses without trusting clocks that disagree.
- Buyer-visible messages as data, so the assistant reads your words rather than composing its own — which is also how policy statements stay accurate, per publishing returns, shipping and warranty terms an agent can quote.
- An explicit expiry, after which the quoted numbers are withdrawn rather than silently honoured. A completion against an expired session is a charge against figures nobody stands behind.
- The same discipline on every tool the agent can call, not only the session — the argument in designing the tool surface a shopping agent is allowed to call.
If the agent never receives a partial response, it can never hold a partial truth. The bug class disappears at the cost of a few kilobytes per call.
What complete state still will not settle
It will not stop a shopper being surprised. A total that legitimately rises when an address arrives still feels like a change of terms, and that is a product decision about what you show before you know, not an API one. Nor does it settle who carries the loss when an agent confirmed something you cannot honour — that is ownership, argued in when an agent places the order, who owns the mistake.
Two adjacent failures worth keeping separate. A charge that fails after the agent has already told the shopper the order is placed is a different sequence entirely — the agent confirmed the order and the charge failed afterwards. And if agents are not reaching your session endpoints at all, the problem is discovery rather than state, covered in agents fetch your manifest and still skip your store.
Build the replay tooling before you need it: a screen that shows one session's calls, responses and totals in order turns this from an afternoon of log archaeology into a 2-minute question, and it is ordinary internal tools and ops work. The rest of this silo sits under agentic commerce and AI shopping assistants, inside our retail and e-commerce practice.
Frequently asked questions
Short answers to the follow-ups this page tends to raise.
Why does an AI agent show a different total from our checkout?
Because it is displaying a response you sent earlier, not computing its own number. Replay the session's calls in order and compare each returned total with what the shopper saw: the displayed figure almost always matches one of your own earlier responses exactly, and the call immediately after it is the one whose response the agent never re-rendered.
Should the total change after the shopper gives an address?
Yes, if tax or duty depends on the destination, because neither can be resolved before the destination is known. The problem is presentation rather than arithmetic. Mark the total as provisional until an address exists, itemise subtotal, discounts, tax and shipping separately, and attach a message the assistant can read out so the change is explained rather than merely observed.
Should responses return only what changed, to save bandwidth?
No. Partial responses force the agent to reconstruct the rest of the session from memory, and reconstruction is where a stale total comes from. Returning the complete state on every call costs a few kilobytes and removes the entire class of defect, because an agent that is handed the whole document each time has nothing to merge incorrectly.
How does an agent know which response is the most recent?
Only if you tell it. Carry a monotonically increasing revision on every session response so any party can order two responses without relying on clocks that disagree, and add an explicit expiry after which the quoted figures are no longer offered. Without a revision, a stale render and a current one are indistinguishable to everyone involved.
- agentic commerce
- checkout
- totals
- diagnostics
The work behind this page
Builds from our portfolio that this page draws on.
AI Lease Management
AI-powered commercial real estate lease management for multi-brand operators — automates lease data extraction, obligation tracking, and portfolio intelligence.
Real EstateShortList
An AI recruiting screener that reads every application, scores candidates against the role, and hands recruiters a ranked shortlist with outreach already drafted.
HR & RecruitingRead next
- The agentic checkout session: a cart your server ownsA server-side basket the merchant owns and an AI agent only renders. Every create, update or complete call returns the merchant's full current state — the property that makes agent buying safe to allow.definition
- The agent confirmed the order and the charge failed afterwardsAn order exists, the shopper was told it is placed, and no money moved. The cause is almost never the card: it is one of the 4 constraints on the delegated token refusing the charge.diagnostic
- Agents fetch your manifest and still skip your storeA file that loads in your browser can be unreachable, unparseable or disqualifying to an agent. Three verdicts, and the ordered checks that tell them apart.diagnostic
- The assistant keeps recommending products you stopped sellingA shopping assistant naming products you withdrew is rarely hallucination. It is a stale index, a missing lifecycle field, an unenforced tool call or a tool returning unpublished rows.diagnostic
- The catalogue tool server: what it may expose, what it must never returnA read-only surface an agent may call over your catalogue. The definition is the boundary: published data and coarse availability in, cost price and customer-keyed data out.definition
- The commerce manifest: the file an agent reads before anything elseA machine-readable declaration of what your store can do, served at a fixed path. It is not marketing, it carries no prices, and 3 serving conditions decide whether an agent can read it at all.definition
Related across the site
Working on something in this space?
Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.
Start the conversation