Up to 59% offLaunch prices on every plan while spots last.See pricing
KANBANMCP
Sign inStart free

How a Multiple Agent System Coordinates Coding Agents

9 min read

Key takeaways

  • A multiple agent system coordinates coding agents by giving each one a role, a way to claim work, and a shared place to leave handoff notes.
  • The blackboard pattern, where agents coordinate through a shared board rather than direct messages, fits solo devs running three or more agent sessions.
  • One card, one git worktree, and one branch per claim prevents two parallel sessions from editing the same files.
  • Handoff notes on cards, not chat history, are the unit of state that keeps context recoverable a week later.
  • You can start with git worktrees, a board, and a claim rule; a multi agent framework is rarely necessary.

A multiple agent system coordinates several coding agents by giving each one a role, a way to claim work, and a shared place to leave handoff notes. This article maps the canonical coordination patterns from the multi agent literature (blackboard, contract net, market-based allocation) onto setups you can run today with git worktrees, a board, and the CLAUDE.md you already have, then tests real tools, including our own, against those patterns.

What is a multiple agent system when the agents are coding agents?

The academic definition is straightforward: independent specialists that share a common workspace and coordinate through it rather than through each other. The classic example is Hearsay-II, a speech understanding system where knowledge sources read and write a shared blackboard, and a scheduler decides which specialist acts next (Erman et al., 1980).

Strip out the speech recognition and that is your Tuesday. Each agent session is a specialist: one works the auth refactor, another clears bug backlog, a third writes tests. The blackboard is your repo plus a board of cards. Agents claim a card, do the work in a worktree, and leave a handoff note for the next session. You are the scheduler, watching the board and steering.

The gap between papers and practice is persistence. Chat sessions are disposable; if the project only lives across chats, context is unrecoverable a week later. A board that agents can read and write, connected over MCP (KanbanMCP docs), gives the system a memory that outlives any single session.

What do the canonical multi agent system papers actually propose?

Four patterns come up again and again in the multi agent system literature, and each one maps cleanly onto something a solo dev running three or more agent sessions can build with git and a board.

Blackboard systems

One shared workspace holds the current state of the problem. Specialist agents watch it, grab whatever part they can advance, write their contribution back, and move on. Nobody talks directly to anybody; the board is the conversation. If you have ever left a handoff note on a card so the next session can pick up the diff, you have built a blackboard.

Contract net protocol

One agent announces a task, others bid, and the announcer awards the work to the best bid. In practice for coding agents this collapses into something simpler: cards sit in a lane marked ready, an agent claims one, does the work in its own worktree, and marks it done. The claim itself is the contract, and the note it leaves is the report back to the manager.

Market-based and auction allocation

Instead of a manager assigning work, agents bid based on cost or capability, and the highest-value bid wins the task. The point is decentralisation: no single coordinator needs full knowledge of every agent's queue. For a solo dev this is mostly theoretical, since you are usually the auctioneer, deciding which session gets which card before you open it.

Shared memory and stigmergy

Stigmergy is coordination through traces left in the environment rather than messages: ants follow pheromone trails, agents follow commits. Your CLAUDE.md, a failing test in CI, or a card moved to review is a trace the next agent reads and acts on. KanbanMCP leans on this pattern: agents claim a card, work it, and leave a note, so the board itself carries the state between sessions (KanbanMCP: one board for all your AI agents).

Which coordination pattern fits which setup?

Pick by counting agents and humans, not by ambition. With one agent, your CLAUDE.md and a task file are the coordination pattern. With three or more agent sessions and one human, the blackboard pattern wins: a shared board as the single system of record, agents claim a card, leave a handoff note, and you steer from the same board. Contract net allocation, where agents bid on tasks, comes from Smith's 1980 contract net protocol Wikipedia overview, but solo devs rarely need bidding; a lane per project with a claim rule is enough.

SetupPatternWhy
1 agentTask file + CLAUDE.mdNo contention to resolve
3+ agents, 1 humanBlackboard on a kanban boardCards serialize claims; git diff in the morning shows what moved
3+ agents across toolsBlackboard + lanes per toolKeeps sessions disposable, context recoverable

The board, not chat, holds the handoff notes; that separation of record from working memory is what makes a multiple agent system recoverable a week later. KanbanMCP implements exactly this pattern (how agent memory works).

How do you implement the blackboard pattern with a board and worktrees?

The blackboard pattern needs three things: shared entries, isolated workspaces, and state that survives a session ending. In practice that maps to cards on a board, git worktrees, and handoff notes. No framework required.

One card, one worktree, one branch

Each card gets its own worktree and branch, created when an agent claims the card. The agent runs git worktree add ../feature-x -b feature-x, works there, and never touches another card's tree. Two parallel sessions can't stomp on each other's uncommitted changes, and the git diff in the morning tells you exactly what each agent did. If a run goes sideways, you delete the worktree and the board still holds the intent. The command's behaviour is documented in the git worktree reference.

The handoff note as the unit of state

When an agent finishes, it writes a short note on the card: what it changed, which tests pass, what the next session should know. That note is the blackboard's state update, and it matters more than chat history because chat sessions are disposable. If the project only lives across agent chats, you lose the context a week later.

Tools like KanbanMCP (Other / any MCP client) formalize this: agents claim a card, do the work, leave the note, and the next agent picks up from there while you steer from the same board.

How does contract net task allocation work when agents claim cards?

The contract net protocol has a manager announce tasks, agents bid, and the manager award the job. You do not need bidding to get the useful part: mutual exclusion. Bidding exists so the right agent wins; a claim protocol exists so only one agent wins at all.

A claim protocol is three rules any agent can follow from its config or MCP tools: read the board, move a card from "ready" to "in progress" with your session ID, then leave a handoff note when done. If a move fails because another session claimed it first, pick the next card. No negotiation, no manager.

This is the pattern KanbanMCP is built around: agents claim a card, do the work in a worktree, and leave a note for the next session, which is what the Lovable agent setup walks through. You watch the board, review the git diff in the morning, and steer from the same place.

The honest trade-off: first-claim-wins means the wrong agent can take the wrong card. In practice, for one developer running three or more parallel sessions, that costs less than running a bidding round you have to supervise anyway.

What failure modes show up when you run three or more agent sessions?

Two agents, one file

The classic race condition from the papers shows up as two agents claiming overlapping work and editing the same file from different sessions. You see it in the repo as a merge conflict neither agent can resolve sensibly, or one agent's change silently overwriting the other's. The fix is allocation discipline: a card gets claimed exactly once, and each claim maps to one worktree so parallel sessions never share a checkout.

The stale handoff note

An agent finishes a card, writes a note for the next one, then the plan changes and nobody updates the note. The next session picks up the card and follows instructions that no longer match the git diff in the morning. Handoff notes rot fast when several lanes move at once, so notes need to live on the card they describe and get overwritten on every state change, not accumulated.

Context that only lives in chat

The failure builders report most often: a project that exists across chat sessions becomes hard to recover a few weeks later. If decisions and status live only in disposable sessions, no agent picking up a card can reconstruct why. Keep the system of record on the board and in files; treat chat sessions as disposable working memory.

How do existing tools map to these patterns?

The status quo covers the blackboard pattern in its rawest form: a backlog.md file or a home-made board acts as shared memory, and agents read and mutate it through file edits. That works until two sessions write at once, which is exactly the stigmergy problem — coordination through traces left in a shared environment — described in stigmergy research. Contract net allocation stays manual: you paste a task, an agent picks it up.

Vibe Kanban and Agent Kanban formalise the claim-a-card loop, with Vibe Kanban open source on GitHub. Taskmaster sits adjacent, generating ordered task lists rather than coordinating live sessions.

Running KanbanMCP through the same criteria honestly: it implements the blackboard and handoff note pattern directly, since agents claim a card, work, and leave a note for the next session, and you steer from the same board. What it does not do is decide your lanes or your review process — you still bring your own worktrees, tests and CLAUDE.md conventions.

What should you build first if you are starting from scratch?

Build in this order: system of record, claim protocol, handoff note, review gate.

First, split the system of record from working memory. Tasks live in one board or file; chat sessions stay disposable. Anything worth keeping gets written into the task or the CLAUDE.md, not left in a chat.

Second, a claim protocol. Each agent claims a card before starting and marks it in progress, so two parallel sessions never edit the same card. One worktree per claimed card keeps diffs separable.

Third, a handoff note template: what changed, what tests pass, what the next agent should check. A few lines per card is enough.

Fourth, the review gate. You read the git diff in the morning and move cards yourself. If that setup works, you likely do not need more tooling yet.

FAQ

Do I need a multi agent framework to run several coding agents in parallel?

No. The core pattern is git worktrees, a shared board or task file, and a claim rule: an agent moves a card to in progress before starting and leaves a handoff note when done. A backlog.md plus CLAUDE.md covers one agent; three or more sessions need the board to serialize claims, not a framework.

How do I stop two agents editing the same files at the same time?

Allocation discipline, not merge heroics. Every card gets claimed exactly once, and each claim maps to one worktree and one branch, so parallel sessions never share a checkout. If two cards overlap in scope, that is a card-splitting problem. A failed claim means the agent picks the next card.

Is a multiple agent system overkill for a side project with one developer?

One agent, yes: a task file and CLAUDE.md are enough, since there is no contention to resolve. The blackboard pattern earns its keep once you run three or more sessions, because cards serialize claims and the morning git diff shows what moved. Match the pattern to your agent count, not your ambition.

What should a handoff note between agents contain?

Three things: what changed, which tests pass, and what the next session should check first. A few lines per card is enough. Notes live on the card they describe and get overwritten on every state change rather than accumulated, so a stale note cannot send the next agent against the actual diff.

Can agents in different tools like Claude Code and Cursor share the same task board?

Yes, and lanes per tool keep it clean. The board is the system of record, so any session that can read and write cards can claim work, work its own worktree, and leave a note, regardless of which tool it runs in. Chat stays disposable; the board carries state between sessions.