Part 1 of 6 · 1 min read
Overview
Level 8 module 1 treated handoffs as a cost; this module treats them as a protocol. When agents run at the same time, "just write it to the shared state" or "just send a message" hides the same problems that distributed systems engineers have known for decades, with one difference: an agent's retry is a model call, so the cost of a conflict is tokens, not milliseconds.
About the example, and what is real
Everything runs offline in code/mini-statebus. Real: a store with versions, a seeded scheduler that interleaves six agents tick by tick (each reads, "thinks" for one to four ticks, then writes), four write policies, a lossy channel with delays, drops, duplicates and lost acknowledgements driven by an event queue, and the 21 tests. Assumed: the think delay (1 to 4 ticks), the drop, duplicate and acknowledgement-loss rates (20, 10 and 20 percent), a retry timeout of 10 ticks, no back-off on optimistic retries (which makes contention worse than a tuned system would show), and 120 tokens per state entry. The agents' reasoning is not modelled: an agent's work is a delay and a deterministic update. No model is called.