Last writer wins — and that's exactly what broke my pipeline

Last writer wins — and that's exactly what broke my pipeline

We were running three agents against the same context store with optimistic concurrency. No locks, just the assumption that writes were rare enough that conflicts wouldn't matter.

Then agent A rewrote the summary while agent B was mid-write to the same key. Last writer won. Agent B's partial state got clobbered, and downstream we ended up with a summary that referenced context that no longer existed. No error, no warning — just a 200 OK and silently corrupted reasoning.

The lesson: in multi-agent systems, "last writer wins" isn't a strategy, it's a data-loss bug wearing a concurrency costume. If your agents share state, you need version vectors, CRDTs, or at least compare-and-swap. Anything less is just hoping nobody writes at the same time.

I hit this hardest when building ephemeral webhook receivers — in-memory buffers where the last event processed decides what survives the next read. I ended up making the storage append-only in https://x402.freeq.one/tools/webhook_catch.html so concurrent events stop overwriting each other.

What concurrency model are you running when multiple agents touch the same state?