← All posts

Durable Agent Team Messaging for Coding Agents

A platform engineer starts the morning with three useful coding agents and one very human problem. Claude Code has a terminal full of investigation notes. Codex has a patch in another worktree. Gemini CLI found a dependency issue. A reviewer has asked for evidence that a test failure is unrelated. The code exists, the logs exist, and still nobody can answer the operational question quickly: who owns the next step?

That is the gap durable agent team messaging has to fill. It is not chat for chat's sake. It is the coordination layer that gives heterogeneous coding agents a shared record of task state, delivery, claims, artifacts, approvals, handoffs, and history across restarts, machines, tools, and runtimes.

The reader for this problem is not a solo developer trying a new assistant for the afternoon. It is the team coordinating Claude Code, Codex, OpenCode, Cursor, Gemini CLI, IDE-hosted agents, reviewers, CI, and human operators. For that team, terminal transcripts and copy-paste are evidence fragments. They are not an operating model.

The real requirement is coordination, not another chat window

Parallel coding agents are already possible. The harder question is whether their work stays legible when the process restarts, a human steps away, or two agents touch the same initiative from different runtimes.

A durable team layer should answer concrete questions:

  • Which agent has claimed this task?
  • Which worktree, branch, or writable path is it allowed to touch?
  • Which messages were delivered, acknowledged, deferred, or failed?
  • Which artifacts support the current status?
  • Which approval is needed, who can grant it, and what exactly does it authorize?
  • What should the next agent see during handoff?
  • What should be stored for audit but not injected into the model context?

The answer is not a single winner protocol. The stronger architecture is layered: git and worktrees for code state, ACP for editor-to-agent sessions, MCP for tools and local integration, A2A where task-level interoperability is available, and a durable team bus for messages, assignments, artifacts, approvals, delivery state, and audit history.

Map the protocol boundaries before choosing tools

Much of the confusion comes from treating MCP, ACP, A2A, C2A, and Relay-style buses as competitors. They overlap in vocabulary, but they solve different boundaries.

Layer Best fit What it should not be expected to solve alone
MCP Expose tools, resources, and coordination APIs to agents. Team-wide delivery semantics, claims, approvals, identity, or wake policy.
ACP Connect an editor or client to a coding agent session, including updates, tool calls, permissions, and session loading. General agent-to-agent team messaging across runtimes.
A2A Represent tasks, task status, artifacts, history, streaming, polling, and push notifications between clients and agents. Reliable critical-message persistence unless negotiated and implemented outside the message itself.
C2A or Relay-style bus Model channels, inboxes, delivery policy, response policy, threads, files, replay, acknowledgements, and human-to-agent coordination. Source control, CI, sandboxing, and code ownership.

ACP is valuable because it gives an IDE or harness a consistent way to drive a coding agent and replay a session. A2A is valuable because it gives tasks first-class status, artifacts, and lifecycle. MCP is valuable because it lets agents call a shared coordination server. But none of those automatically gives a team a durable inbox, work claims, approval ledger, artifact lineage, or cross-runtime handoff history.

That missing middle is where Agent Relay, Relaycast, C2A, bot-relay-mcp, MAGI, Meshterm, Roundtable, and Agent Comms are all pointing in different ways. The recurring pattern is durable records first, realtime signals second.

Delivery is not injection

One of the most important ideas in the brief comes from C2A: delivery is not prompt injection. A message can be stored, addressed, visible, searchable, and auditable without forcing an LLM turn.

That distinction matters in agent teams. If every visible message wakes every agent and demands a reply, the bus turns into a loop generator. A reviewer says "thanks", a helper agent responds, a coordinator summarizes the response, another agent sees the summary and reacts, and the channel becomes work that nobody asked for.

A practical team bus needs response policy as part of the protocol, not only as a prompt instruction. Examples include must_respond, may_respond, and must_not_respond. Most status messages should be visible and stored, but not injected. A task assignment might require acknowledgement. A direct question from a human may require a response. A delivery receipt should never start a reasoning loop.

The model should see less than the log stores. Store the full history for audit and retrieval. Inject only the messages that are addressed, policy-filtered, or explicitly pulled into the active turn.

The durable unit is a task, not a terminal

A terminal transcript can tell you what happened in one process. A durable coordination record should tell you what the team is trying to accomplish.

For coding-agent work, the durable unit should look more like this:

  • task_id: stable identity for the work.
  • thread_id and context_id: conversation and continuation boundaries.
  • from, to, and role: sender, intended recipient, and responsibility.
  • worktree, branch, and writable_paths: the safe execution boundary.
  • status: requested, delivered, claimed, working, blocked, input-required, completed, verified, approved, failed, or canceled.
  • artifacts: diff, commit, PR, log, screenshot, test output, CI run, design note, or report.
  • evidence: the specific command output or review signal that supports the status.
  • approval_required and decision_id: what needs human or policy authorization.
  • deadline, lease_until, and idempotency_key: the reliability controls.

This is the difference between "Codex said it fixed it" and "task 1847 was claimed by Codex in worktree B, changed these files, ran this test, opened this artifact, needs reviewer approval for this exact diff, and can be safely resumed by another agent if the lease expires."

Claims beat casual assignments

Messages are useful for conversation. Claims are useful for work ownership. A serious multi-agent coding system needs both.

If a coordinator posts "someone fix the failing parser test", two agents may start. That can be acceptable for brainstorming, but not for file mutation. A claim or lease gives the team an explicit owner for a bounded period. If the agent crashes, the lease expires. If the work is blocked, the task can move to input-required. If the claim is stale, another agent can take over with the previous artifacts and evidence attached.

Meshterm's lease and acknowledgement framing, Agent Comms' work claims, Relaycast delivery rows, and bot-relay-mcp task queues all point toward the same distributed-systems rule: duplicate delivery may happen, so consumers must be idempotent and ownership must be explicit.

Reliability starts with persisted inboxes

Realtime transport is an optimization. It is not the source of truth.

WebSockets, SSE, Pub/Sub, hooks, editor extensions, and filesystem markers are useful because they wake agents quickly. But the message itself should live in a durable store with cursors, delivery state, and replay. If a process is offline, it should reconnect and read its inbox. If a delivery fails, the system should retry, defer, or dead-letter it. If a dashboard loads later, it should reconstruct state from records, not from a live terminal stream.

The minimum reliability contract should include:

  • Per-recipient delivery rows or equivalent inbox state.
  • ack, fail, and defer mutations.
  • Idempotency keys for message send, task claim, artifact attach, and approval decisions.
  • Retries with bounded budgets.
  • Dead letters for messages or tasks that cannot be completed.
  • Offline replay from durable history.
  • Retention policy for messages, artifacts, approvals, and logs.

SQLite can be a good local-first choice for solo or single-machine workflows. Redis Streams, server-backed queues, or hosted coordination services become more relevant when agents span machines, users, and long-running processes. The trade-off is operational complexity versus shared durability and realtime collaboration.

Approvals need object scope

Approving "the agent" is too broad. Approving "this exact diff", "this tool call", "this workflow change", or "this deployment-impacting action" is useful.

ACP already models client-agent permission requests for tool calls, which is valuable inside an interactive session. A team bus needs a wider ledger: who approved, what exact artifact or action was approved, under what authority, when it expires, whether arguments were edited, and whether the approval can be reused by another runtime.

For coding agents, approval scope should attach to concrete objects:

  • A diff or pull request.
  • A command with arguments.
  • A write to a protected path.
  • A network or secrets access request.
  • A CI workflow run.
  • A handoff decision.

This also improves audit. A reviewer can see the task, artifact, evidence, approval, and final outcome as one chain instead of reconstructing a story from chat messages and shell logs.

A reference architecture that holds up

For teams coordinating multiple heterogeneous coding agents, the practical architecture has seven parts:

  1. Git and worktrees: isolate file changes and preserve normal code review.
  2. Agent session layer: use ACP or host-native session APIs where available for editor control, permissions, updates, and session replay.
  3. Tool layer: expose coordination actions through MCP where agents need a portable way to claim tasks, read inboxes, attach artifacts, or request approvals.
  4. Task protocol layer: use A2A-style task, artifact, status, history, streaming, and push semantics where remote agent interoperability matters.
  5. Durable team bus: persist addressed messages, channels, inboxes, delivery rows, threads, response policies, and wakeups.
  6. Artifact store: link diffs, logs, screenshots, test outputs, CI runs, and decision notes with hashes or stable references.
  7. Dashboard and approval inbox: show task ownership, blocked state, evidence, pending decisions, and audit history without relying on terminal output.

The bus should bind git, CI, issue trackers, and agent runtimes. It should not replace them. Git remains the code state. CI remains validation. Issues remain product intent. The durable bus is the coordination memory that connects them.

Implementation choices and trade-offs

Choice Works well when Main risk
Local SQLite relay Agents run on one machine or one developer needs durable inboxes and task state. Shared-machine locking, backup, credential isolation, and remote agent access.
Redis Streams plus Pub/Sub The team needs durable logs plus fast wakeups across processes. Operational ownership, retention, consumer groups, and failure recovery policy.
Hosted Relay-style service Agents, humans, and machines need shared channels, DMs, files, search, replay, and delivery state. Vendor dependency and permission model maturity.
A2A gateway Remote agents need task, artifact, status, streaming, polling, or push interoperability. Message persistence still needs explicit guarantees.
MCP coordination server Different coding agents need a portable way to call the same coordination tools. Tool calls alone do not define delivery, wake, approval, or identity semantics.

The decision depends on scale and failure tolerance. For a local experiment, a SQLite-backed MCP server may be enough. For a team running agents across machines, a proper durable bus and dashboard become infrastructure. For a product exposing agent teams to customers, audit history, approvals, retention, and artifact integrity become product requirements.

What platform teams should standardize first

Start with the contract, not the brand of bus. The first useful standard is the message and task envelope every agent must use.

  • Every task has an owner or an explicit unclaimed state.
  • Every agent message has a sender, recipient, thread, response policy, and delivery state.
  • Every file-changing task names its worktree, branch, and writable paths.
  • Every completed task attaches evidence: diff, tests, logs, PR, or review note.
  • Every approval attaches to an object, not a vague session.
  • Every wake signal points to durable inbox state.
  • Every handoff includes current status, blockers, artifacts, and next action.
  • Every agent run is observable from a dashboard without reading terminal scrollback.

This is also where internal documentation matters. A team should define which statuses are allowed, who can claim what, what counts as verification, which paths require approval, and when a stale task becomes orphaned.

Related reading: multi-agent coding orchestration, long-running background AI agents, AI agent observability for coding agents, and agent harness for coding agents.

Conclusion: make the team state durable

The useful question is not whether ACP, MCP, A2A, C2A, or Relay wins. The useful question is which boundary each one owns.

Use ACP for editor-to-agent control. Use MCP for portable tools. Use A2A where task and artifact interoperability matters. Use git, worktrees, CI, and pull requests for code delivery. Then add a durable team bus for the part none of those should be forced to fake: addressed messages, inboxes, claims, delivery receipts, artifacts, approvals, wakeups, and audit history.

When that layer exists, coding-agent teams become easier to operate. A human no longer has to be the middleware between terminals. An agent can pause without losing the story. A reviewer can inspect the evidence. A replacement agent can resume from structured state. The team can coordinate work instead of reconstructing it.

Get started

Deploy your fleet.

Put a fleet of sandboxed agents to work on your own infrastructure, provisioned in seconds and watched live from one console.

Get started →

Admin-provisioned · Self-host in one command · Your data never leaves your VM