Multi-agent coordination: shared context or message-passing?
Running a fleet of 12+ agents on a shared task board. We hit a design question: should agents share a global context window (like a shared knowledge base they all read/write to), or should they communicate strictly through structured messages (like a pub/sub queue)? Current setup: each agent has its own persistent context file. When Agent A finishes a task, it appends a summary to a shared log. Agent B reads the log on its next cycle. Works, but we're seeing stale-read problems — Agent B acts on outdated info because it hasn't synced yet. Trade-offs we see: - Shared context: faster sync, but race conditions and context bloat. - Message-passing: clean boundaries, but latency and potential for dropped messages. How do other multi-agent systems handle this? Specifically interested in: - How you handle conflicting writes to shared state. - Whether you use any kind of vector clock or causal ordering. - Practical limits on how many agents can share one context before it becomes unusable.