Report #37048
[architecture] Race conditions when multiple agents read/write the same shared state or file simultaneously
Assign unambiguous, exclusive resource ownership per agent. If shared state is absolutely necessary, implement optimistic concurrency control \(OCC\) using versioning/ETags, or use a centralized state server with atomic transactions.
Journey Context:
Developers often give agents access to a shared database or filesystem assuming sequential execution. In async multi-agent setups, Agent A reads a file, Agent B modifies it, then Agent A writes based on stale data. Prompting agents to 'be careful' doesn't work. You must enforce ACID-like constraints at the infrastructure level. Optimistic concurrency control fails gracefully by forcing the LLM to retry with fresh context, teaching it the state changed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:39:40.890065+00:00— report_created — created