Coordination and Communication
Messages, Shared State, Synchronization and the Cost of Working Together
Several Agents Do Not Automatically Make a Team
Page 34 introduced a multi-agent system: several AI agents working within one larger mission. But merely starting several agents does not coordinate them.
Coordination requires mechanisms that move information, assign work, preserve state and enforce dependencies.
And our terminology matters: an agent is the goal-directed loop or role. While pursuing that role, it may cause many separate model-inference processes to occur.
The Basic Communication Problem
Suppose Agent A discovers:
Agent B cannot use that fact merely because Agent A produced it. The information must be represented somewhere and transported through an actual system mechanism.
Four Common Communication Mechanisms
Direct Handoff
A result or request is explicitly sent from one component to another.
Asynchronous Handoff
A producer places work or results into a queue; another worker receives them later.
Common Store
Agents read and write task information in a database, file, object store or other shared structure.
Mediated Handoff
A controller receives results, updates mission state and decides what another agent should receive next.
A Message Is Data, Not Mind Transfer
An agent-to-agent message might contain natural language, JSON, identifiers, evidence references, tool results or another structured format.
If natural-language text is supplied to another model inference, we are back at our familiar doorway:
The receiving model does not receive the sender's internal activations or “thoughts.” It receives whatever representation the system deliberately transfers.
Shared State
Instead of sending every result directly, several agents may work through shared external state.
Goal: diagnose HAAW outage
A status: complete
A finding: host reachable, httpd failed
B status: complete
B finding: syntax error line 83
C status: running
D status: waiting for A/B/C
This is not the model's context window. It is system state maintained outside the model. Selected portions can later be placed into an agent's context.
That distinction comes directly from Page 32:
Who Owns the Truth?
Shared state introduces a classic systems question: which component is authoritative?
If Agent A says the service is down, Agent C says HTTP is responding, and the monitoring database says the service recovered 20 seconds ago, the system must preserve timestamps and provenance rather than overwrite everything with one convenient sentence.
Synchronization — When Work Must Wait
Suppose A, B and C begin at the same time:
If D requires all three results, D cannot complete at five seconds.
Parallel work removes some sequential waiting. Dependencies put waiting back wherever later work requires unfinished results.
A Barrier
In parallel computing, a useful concept is a barrier: participating work reaches a point and waits until required peers have also arrived.
A multi-agent workflow can contain an analogous synchronization point:
LOG RESULT ✓
EXTERNAL TEST …
──── SYNCHRONIZATION BARRIER ────
SYNTHESIS WAITS
The implementation need not literally use a low-level parallel-programming barrier. The concept is the dependency: later work cannot correctly proceed until required earlier work is available.
Not Every Dependency Requires Everyone
Sometimes the system can proceed after the first useful result, a quorum, or any one of several alternatives.
| Dependency Rule | Meaning |
|---|---|
| ALL | Wait for every required branch. |
| ANY | Proceed when one acceptable branch succeeds. |
| QUORUM | Proceed when enough independent results are available. |
| TIMEOUT | Stop waiting after a defined limit and handle missing results explicitly. |
| CONDITION | Proceed when a particular evidence condition is satisfied. |
Waiting Has a Cost
Wall-clock time for a multi-agent mission is not simply the sum of model computation.
An agent can be completely idle while waiting for a database, another agent, a human, or an external service.
Communication Has a Cost Too
Sending everything to everyone would simplify some information problems—but create others.
Tokens
Transferred text may consume context and inference tokens.
Bandwidth
Large evidence sets consume network and storage resources.
Context Pressure
Irrelevant information competes with relevant information inside finite context.
Latency
Serialization, transport, retrieval and processing all take time.
Therefore coordination often involves selection and compression.
The Compression Problem
Efficient—but what disappeared?
Potentially the exact line, surrounding events, timestamps, repeated failures, source identity and uncertainty. A good handoff can therefore include both a compact finding and references back to evidence.
Evidence: config-test event E-1882; log event E-1879.
Source: host web01.
Observed: 14:32:08.
Interpretation: likely cause of failed service start.
Messages Can Become Stale
Distributed systems live in time. A perfectly accurate message at 14:32 may be wrong at 14:34 because the external world changed.
Truth about system state needs a timestamp.
This is why a result should often carry when it was observed, not merely what was observed.
Ordering Matters
Imagine these two events:
E2: Human edits configuration.
If another agent receives the events in the wrong conceptual order, it can reason from stale state. Message systems therefore often use timestamps, sequence numbers, event IDs, versions or causal relationships to help reconstruct order.
Race Conditions
Now let two authorized agents act on shared state:
AGENT B READS VERSION 7 → prepares different update
If both blindly write, one can overwrite the other's work.
This is not a uniquely AI problem. It is an old concurrency problem appearing inside an AI-enabled system.
Locks, Versions and Transactions
Ordinary computing techniques can control shared-state conflicts.
Lock
Temporarily restrict competing access to a resource.
Version Check
Update only if the object is still the version the agent read.
Transaction
Group operations so they succeed or fail according to defined consistency rules.
Idempotency
Design an operation so retrying it does not accidentally duplicate the intended effect.
R/W/X and the Change Question
Our Page 33 refinement fits naturally here.
Change is not merely another permission bit in our conceptual model. It is also the consequence question: what state was different after the operation?
That matters even in multi-agent coordination because one agent's state change can invalidate another agent's earlier observation.
Failure Must Travel Too
Communication is not only successful results.
If Agent C fails, the orchestrator should not quietly represent “no result” as “everything looked fine.” Absence of evidence and evidence of absence are different.
Retries Need Identity
A failed operation may be retried. Without event and operation identities, WITNESS could mistake three retries for three independent actions.
The lineage should preserve that these are attempts at the same task.
Human Communication Is Part of the System
A human can receive an agent's proposal, provide missing information, reject an action, approve it, or redirect the mission.
The human is therefore not outside the dependency graph merely because the other nodes are software.
WITNESS: Record the Edges, Not Just the Nodes
For coordination, recording that Agent A and Agent B both ran is insufficient. We need to know how one event influenced another.
The edge between two events can be as important as either event.
Timeline Versus Causality
Two events occurring close together are not necessarily causally related. Conversely, a result created minutes earlier may directly cause a later action.
LINEAGE tells us FROM WHAT
DEPENDENCY tells us WHAT HAD TO HAPPEN FIRST
That is why WITNESS increasingly looks like an event/dependency graph rather than a transcript.
The Cost of Working Together
Multiple agents can improve specialization, parallelism and independent checking. But coordination itself consumes resources.
| Potential Benefit | Coordination Cost |
|---|---|
| Parallel investigation | Synchronization and result merging |
| Specialized roles | Message routing and context preparation |
| Independent checking | Additional inference/tool cost |
| Smaller per-agent context | Risk of losing information at handoffs |
| Distributed action | Concurrency, stale state and conflict control |
There is no free coordination. The design question is whether the added structure produces enough value to justify its cost and complexity.
The Boundary
Agents communicate through implemented mechanisms: messages, queues, shared state, tools and orchestrators.
Communication transfers representations, not hidden minds.
Synchronization expresses dependencies.
Shared state introduces familiar problems of ordering, staleness, races and consistency.
Communication and coordination consume time, tokens, bandwidth, storage and computation.
For WITNESS, causal lineage matters alongside timestamps.
Working together is itself work.
HAAW Checkpoint
Message: Explicit information transferred between components.
Queue: A mechanism allowing producers and consumers to exchange work or results asynchronously.
Shared State: External task information accessible to multiple components.
Synchronization: Coordination that enforces required ordering or completion dependencies.
Barrier: A conceptual or implemented point where later work waits for required parallel work.
Stale State: Information that was valid when observed but no longer describes the current system.
Race Condition: Incorrect or unpredictable behavior caused by timing/order among concurrent operations.
Version Check: Ensuring shared state has not changed unexpectedly before applying an update.
Idempotency: A property allowing an operation to be safely repeated without duplicating its intended effect.
Lineage: The source and parent/child relationships connecting evidence, messages, tasks and actions.
Agent vs Process: An agent is the goal-directed role/loop; it may invoke many model-inference processes while performing its work.
Central lesson: Multi-agent intelligence depends as much on information movement and coordination as on the model inference occurring at each node.
Failure, Recovery and Retry — What Happens When an AI System Does Not Get the Result It Expected?