ontoloji.orgOpen Reference Hub
Agent Architecture & Governance12 min read·Updated: 2026-12-03·Türkçe sürüm →

Multi-Agent Coordination Patterns: Pull Task Boards, File Mailboxes, Two-Level Abort & Batching

Production coordination primitives from modern coding harnesses: lockfile-backed pull task boards, append-only JSON mailbox IPC, nested two-level AbortControllers, and concurrent-read / serial-write tool partitioning.

Executive Summary — Key Takeaways
  • 01Push-based central coordinators bottleneck on worker tracking and crash recovery; disk-backed pull task boards with blocks/blockedBy arrays let idle agents self-assign unblocked work atomically.
  • 02Append-only per-agent JSON mailboxes guarded by proper-lockfile survive process crashes, require zero broker infrastructure, and multiplex chat turns with structured control messages.
  • 03Nesting a turn-level AbortController inside a lifecycle-level AbortController lets operators interrupt a runaway tool call and redirect the agent without destroying session state.
  • 04Partitioning multi-tool model turns into consecutive concurrent read batches (isConcurrencySafe) and isolated serial writes eliminates state-mutation race conditions automatically.

1. Pull-Based Shared Task Boards vs. Push Coordinator Bottlenecks

In push-driven multi-agent frameworks, a central leader must constantly poll which worker is free, decide what to dispatch next, and recover orphaned tasks when a process dies. A pull-based task board flips control: the leader writes dependency-linked JSON task files to disk, and idle workers atomically claim the lowest-ID unblocked task.

  • Lockfile Concurrency Discipline: claimTask() acquires a list-level proper-lockfile (with 5–100 ms exponential backoff), re-reads disk state after locking to prevent stale reads, verifies the caller is not already busy, and sets owner + in_progress atomically.
  • Automatic Dependency Unblocking: Marking task 1 as completed filters 1 out of downstream blockedBy lists on read so dependent tasks surface immediately without leader intervention.
Disk-Backed Pull Task Board & Five-Tier Mailbox Read Priority
Task Board Storage (~/.agent-runtime/tasks/<teamName>/):
  ├── 1.json  { id, subject, status, owner, blockedBy: [], blocks: [2, 3] }
  ├── 2.json  { id, subject, status: "pending", blockedBy: [1] }
  └── .highwatermark  (prevents ID reuse after task deletion)

Teammate Read Priority (Checked Each Turn):
  1. In-memory pendingUserMessages (lowest-latency fast path)
  2. Shutdown requests (shutdown_request -> always evaluated first!)
  3. Team-lead messages (leader outranks peer chatter)
  4. Unread peer messages (FIFO order)
  5. Lowest-ID unblocked task on the shared task board (auto-claim)

2. File-Based Mailbox IPC & Nested Two-Level Abort Control

Sockets and message brokers add operational fragility to local and containerized agent teams. One JSON inbox file per agent (inboxes/<agent>.json), written under an exclusive lock after re-reading disk contents, works identically across in-process threads and separate OS processes while remaining inspectable with standard CLI tools.

Long-running agents also require two distinct stop granularities—pausing a mistaken tool call versus terminating the worker outright:

  • Multiplexed Control & Conversation Payloads: A single type discriminator routes plain text as conversation turns alongside shutdown_request, permission_request, plan_approval_request, task_assignment, and idle_notification envelopes.
  • Lifecycle vs. Turn AbortController: Aborting currentWorkAbortController stops only the active turn (signal.reason === "interrupt" when a user sends a mid-turn correction) so the agent stays alive and reads its next mailbox message; aborting the parent lifecycleAbortController runs full teardown.
  • Per-Tool Interrupt Contracts: Read-only search tools declare interruptBehavior: "cancel" to abort immediately on new input, whereas transactional writes declare "block" so in-flight mutations finish cleanly.

3. Concurrent Read / Serial Write Batching Over a Shared Ontology

When a model emits seven tool calls in a single turn, running them serially wastes wall-clock seconds, while running all seven in parallel risks write races. Automatic batch partitioning resolves both:

  • partitionToolCalls Scheduling: Consecutive tools marked isConcurrencySafe: true execute concurrently (up to a bounded pool such as 10), while any state-mutating tool starts a dedicated serial batch.
  • Deferred Context Modifiers: Side effects on session context produced by concurrent reads are queued and applied deterministically only after the entire parallel batch completes.
Why Mechanical Coordination Still Needs Semantic Alignment

Lockfiles and mailboxes prevent file corruption, not business contradiction. Ensure every worker on the task board queries one shared enterprise ontology so financial, inventory, and planning agents compute identical numbers.

Glossary Concepts Referenced in This Guide

Open License (CC BY 4.0) · Cite This Page

Free to reference in engineering docs, ADRs, articles, and course syllabi with attribution.

[Multi-Agent Coordination Patterns: Pull Task Boards, File Mailboxes, Two-Level Abort & Batching — Ontoloji.org](https://ontoloji.org/en/guides/claude-code-multi-agent-patterns-task-boards-mailboxes-and-abort)

More Guides in This Series

Core Architecture
How AI Uses an Ontology
9 min read
Agent Engineering
Agent Harness vs. Ontology
8 min read
Data Engineering
ERP, CRM & MES Patterns
10 min read
Strategy & Governance
30-Day Ontology Strategy
7 min read
ERP Integration
ERP Ontology Integration Guide
11 min read
ERP Data Engineering
Logo Tiger, Nebim V3 & Turkish Unicode Traps
14 min read
Agent Governance
Adversarial Verification, Permissions & Compaction
13 min read
Verification Engineering
Absence-Aware Gates & Ratio Reconstruction
13 min read
Provenance & Governance
Draft vs. Normative Provenance Hygiene
12 min read
SAP & Protocol Architecture
SAP BTP, Cloud Connector & ORD Ontology
11 min read
ERP Write-Safety
Logo REST, Nebim Integrator & UBL-TR Safety
12 min read
Platform Architecture Comparison
Cortex, Genie, dbt & Cube vs. Ontology
12 min read
Systems Engineering & Forensics
ERP Integrator Anti-Patterns & Forensics
13 min read
Platform Architecture Comparison
Fabric IQ, D365 MCP & SAP Joule vs. Ontology
12 min read
Retrieval & RAG Architecture
PageIndex Vectorless Tree RAG vs. Vector DBs
11 min read
Platform Architecture Comparison
Atlan, Stardog & Neo4j vs. Ontology
12 min read
Statutory & Financial Governance
GİB UBL-TR, VUK/TMS 29 & KVKK Ontology
13 min read
Agent Memory & Ontology Architecture
Cognee & Zep Graphiti vs. Ontology
11 min read
Protocol & Multi-Agent Architecture
MCP vs. OpenAPI & Specialist Agents
12 min read
Protocols & Standards
MCP 2026-07-28: Tasks, Events & Apps
13 min read
Agent Architecture & Governance
Agent Harness Engineering Rubric
12 min read
Verification & Security
Generate-Evaluate-Repair & Observers
12 min read
Verification & Security
NSA MCP Security & CIMD vs. DCR
13 min read
Agent Architecture & Governance
OpenTelemetry for AI Agents & MCP
11 min read