polycratia

An agent that passes testing has usually been tested against one thing: a world that holds still.

In a test run it reads state, plans, and acts inside a window where nothing else writes. Production has other writers: an operator in an admin panel, an inbound webhook, a scheduled job, another instance of the same agent working the next item in the queue. The read that justified step one is stale by step seven, and the agent cannot notice, because its context is text and text does not go out of date loudly.

The mechanics, concretely.

A multi-step plan sits on a snapshot, and every tool call widens the gap between what was observed and what is being acted on.

A retry re-runs the plan and not the read, so the second attempt reasons about a world that has already moved.

In catalog pipelines the source itself shifts under a paginated crawl, so the agent ends up reconciling against items that changed position or disappeared mid-run.

And concurrency with itself is the case tests almost never cover: one agent in staging, many in production, touching the same records.

So I build agent tool layers the way I build payment writes. Every read returns a version along with the data, and every write carries that version back. If the version moved, the write fails and the agent re-reads instead of quietly overwriting an operator's correction. A loud conflict is cheap. A confident wrong action against stale state is not.

Most agent reliability work I see goes into the model and the prompt. The durable wins sit at the tool boundary, where staleness becomes detectable.

If your agent writes to production state, this is what I would check: does the write carry the version of the state it reasoned about, or just the new field value?

react

$ new-project --brief

or email hey@polycratia.com