A two-phase write looks simple from the outside. The agent calls a dry run endpoint, receives a plan describing exactly what would happen, then calls a commit endpoint to apply it. The server does the hard part: it validates inputs, builds the plan, mints a token, sets an expiration, and refuses to apply anything the token does not cover.
Server teams test that part well. They test token reuse, expiry, and mismatched payloads. What goes untested is the space between the calls, because the agent owns that space. The agent decides what to retain, how long to retain it, what other work to do in between, and whether to retry. Each of those decisions can turn a safe protocol into an unsafe one.
The failure is rarely dramatic. It is a plan that was correct when made and wrong when applied, with a token that still validated because nobody told the server the inputs had moved. Any prepare-then-apply protocol has this shape, and the classic objection to two-phase commit in microservices is exactly this window: the coordinator can fail after prepare and leave participants uncertain (Stack Overflow). An agent is a coordinator with an unusually short memory.



