Multi-Agent Swarm Collaboration: How Coordinators, Shared Boards, and Wake Signals Keep Long Tasks on Track

    As tasks grow longer, a single agent session tends to drift from its original goal: constraints set early get diluted by context compaction, rework rises, and progress is sometimes scrapped entirely. This article explains the Swarm collaboration model used in multi-agent coding tools, covering three core mechanisms: a coordinator that only dispatches work, reviews results, and makes decisions; an append-only bulletin board that acts as the single source of truth and lets members rebuild context by reading from a given sequence number; and sleep/wake behavior with channel isolation to control communication fan-out. It also lists practical guidance on front-loading constraints, single-responsibility roles, minimal handoffs, precise wake signals, closed-loop acceptance, and observability.

    1. The Problem: Agent Forgetting and Failure in Long Contexts

    As task chains get longer, the context window an agent maintains fills up with intermediate output. Constraints, interface agreements, and acceptance criteria defined early on are often diluted or dropped after several rounds of interaction and context compaction. One visible symptom: the further a task progresses, the more the output drifts from the original goal, and rework climbs sharply. After a single compaction, an agent may even “forget” what it was doing and the current progress has to be discarded.

    The root cause is not a lack of model capability. It is that a single serial session carries too many responsibilities at once: planning, coding, debugging, testing, and reporting all sit in the same context, so any compaction causes information loss, and that loss is not controllable. The common industry response is to reshape “one long session” into “a team of agents with division of labor, memory, and scheduling rules” — the Swarm collaboration model.

    2. Core Mechanism 1: The Coordinator and Task Decomposition

    In multi-agent coding tools that support agent collaboration, there is usually an entry point in the form of a slash command. After you run that command and describe the goal, the current session switches to the coordinator role: it first decomposes the task into a structured breakdown, then spins up a team with clearly divided roles that moves forward in parallel.

    The coordinator’s scope must be strictly narrowed to three things: dispatching work, accepting results, and making decisions. It does not write code itself, and it does not debug or test. This yields two direct benefits:

    • The main session stays lightweight, so new user instructions can be inserted at any time without breaking the overall flow.
    • Context growth is confined to the “decisions and acceptance” layer, so the coordinator itself almost never hits compaction failure.

    The essential difference from “opening a few more browser tabs” is that the latter is only parallel manual windows — no shared state, no handoff protocol, no sleep and wake mechanism. Swarm is an engineered design with state management and a communication protocol.

    3. Core Mechanism 2: A Shared Bulletin Board and Recoverable Context

    The bulletin board is the team’s only authoritative source of truth. Every member’s claim records, change summaries, and test results are appended in monotonically increasing sequence order and retained long term, never overwritten.

    It solves the “amnesia after compaction” problem: after any member goes through context compaction, it can read forward from a given sequence number to rebuild its understanding of task progress, instead of relying on conversation history that is already gone.

    During handoff, only sequence numbers are referenced — for example, asking the acceptance role to check records #4 and #6, rather than copying an entire report into the next message. Illustration:

    1. #1 [planner] Task breakdown: module A interface change / module B regression test
    2. #2 [coder] Module A change summary: added parameter validation, signature unchanged
    3. #3 [tester] Module A test results: 12 passed / 0 failed
    4. #4 [coder] Module B change summary: replaced legacy serialization logic
    5. #6 [tester] Module B regression results: 2 failed, pending localization
    6. #7 [reviewer] Please check #4 and #6 and give a conclusion

    This “append plus reference” pattern cuts the token cost of repeated transmission to a minimum and makes auditing and retrospection feasible.

    4. Core Mechanism 3: Sleep, Wake, and Channel Isolation

    An @ mention on the bulletin board is the wake signal. Idle members enter a waiting (sleep) state and consume no tokens; they are reactivated only when named. So during handoff, only @ the member that actually acts next, and avoid @all, which makes everyone spin idle and wastes quota.

    When the team exceeds eight members, or the task spans several relatively independent modules, the coordinator creates additional channels: the public channel main keeps only cross-module decisions and conflict resolution, while in-module discussion uses targeted channel wake (@#channel), activating only members of that channel.

    The value here is keeping communication fan-out under control. When team size grows linearly, broadcasting every message to everyone makes token consumption and noise rise quadratically; channel isolation pulls the complexity back into a manageable range.

    5. Practical Recommendations

    1. Front-load and make constraints referenceable: write non-negotiable standards as the first bulletin board record, and have all later members reference it by sequence number so nothing is lost after compaction.
    2. Single-responsibility roles: separate planning, coding, testing, and acceptance, with each role owning only its own slice of context.
    3. Minimal handoffs: pass only sequence numbers and conclusions, not full text; keep the minimum reproducible context for failure information.
    4. Precise wake signals: default to targeted @, prohibit indiscriminate all-member wake, and sleep when idle.
    5. Closed-loop acceptance: the coordinator makes decisions based on bulletin board records, and on failure rolls back to the corresponding sequence number and dispatches again.
    6. Observability: use general-purpose logging services and monitoring/alerting capabilities to measure each round of dispatch, elapsed time, and failure rate, making it easier to keep tuning decomposition granularity.

    6. Summary

    The value of Swarm is not parallelism itself. It is using the coordinator to converge responsibilities, the bulletin board to persist context, and sleep plus channels to control communication cost — together turning long tasks from “drifting further off course” into something recoverable, auditable, and scalable. For engineering tasks that must run autonomously for a long time, this mechanism is more robust than simply increasing the number of sessions.