Agent FrameworkSep 17, 20265 min read

Orchestrating Parallel AI Coding Agents with amux's Rust Control Plane

Explore amux, a single-binary Rust control plane for parallel AI coding agents featuring atomic SQLite task claiming, self-healing watchdogs, and .mdai DAG workflows.

Documentation & analysis · 5 source links

macOS TCC Automation Failure Signatures in Fleet Logs

Quantifies machine-emitted macOS permission error signatures observed across 1.5 GB of amux fleet logs to highlight operational bottlenecks in desktop automation.

Executive Summary

When scaling AI coding assistants from single interactive sessions to parallel agent fleets, coordinating execution state becomes a critical bottleneck. Without centralized control, independent agents inevitably step on each other by refactoring identical functions or editing shared files simultaneously Dan Kornas on X. amux addresses this operational challenge as a single-binary, local-first Rust control plane that orchestrates parallel workers (such as Claude Code, OpenAI Codex CLI, and Gemini CLI) using atomic task claiming, structured messaging, and self-healing watchdog loops.

The primary tradeoff of amux's local-first architecture is its dependency on host operating system automation and process isolation (such as tmux and macOS TCC permissions), which requires explicit system grants and local process management. However, for engineering teams operating parallel agent workloads, amux offers a lightweight, zero-external-dependency control plane that enforces execution integrity without requiring full cloud orchestrators amux README.


Core Architecture: Single-Binary Rust Server & SQLite Ledger

According to the amux README, amux consolidates its entire control plane into a single Rust binary containing four primary crates:

  1. crates/amux-server: The core HTTP/HTTPS server built on Axum (defaulting to HTTPS port 8824), wrapping a single-writer SQLite store with an append-only event journal, Server-Sent Events (SSE) delta synchronization, and background orchestration runtimes.
  2. crates/amux-dashboard: A single-page web application embedded directly into the server binary during compilation.
  3. crates/amux-cli: The amux-rs command-line utility for managing tasks, workers, schedules, and health status.
  4. crates/amux-core: Shared domain types covering identifiers, scopes, memory layers, and protocol definitions.

State persistence relies entirely on SQLite, avoiding dependencies on external datastores like Redis Best Claude Code Session Managers 2026. To eliminate worker collisions on the shared kanban board, task claiming is implemented using compare-and-swap (CAS) database operations. This means that when dozens of parallel agents attempt to pick up todo items, atomic state transitions guarantee that exactly one worker receives ownership of a given task amux vs Cline.

Additionally, amux decouples completion from validation by separating task statuses into done (code implemented and merged) and verified (peer-checked or passing CI verification) amux README.


Primitives, Inter-Worker Messaging, and Scope Hierarchy

The amux control plane models multi-agent collaboration through eight fundamental primitives: board, workers, schedulers, filesystem, groups, memories, environment, and messages amux README.

  • Provenance-Stamped Messaging: Inter-worker and human-to-worker communications are logged as structured ledger entries. The server stamps the genuine sender origin on every message, preventing agents from spoofing message sources during turn boundaries amux README.
  • Hierarchical Scope Resolution: Configuration and context (including system prompts, environment variables, and board gates) resolve dynamically across four layers: card → worker → group → global amux README. For a team operating specialized worker lanes (such as frontend vs backend refactoring groups), this hierarchy ensures that workers share scoped environment credentials and shared memory without leaking access across unrelated lanes.

Self-Healing Recovery and Watchdog Controls

Long-running unattended agent operations frequently suffer from context window exhaustion, CLI process crashes, or hung prompts. amux addresses these failure modes through an automated watchdog background task amux vs Cline:

  1. Context Compaction: When token limits are reached, the watchdog triggers context compaction and resumes execution.
  2. Crash Restart & Replay: If an underlying agent process exits unexpectedly, the server restarts the session and replays the last unacknowledged message to restore context.
  3. Stalled Agent Detection: The system identifies sessions that cease outputting tokens and marks them with diagnostic badges to distinguish blocked prompts from fatal crashes Best Claude Code Session Managers 2026.

Computed Markdown Workflows: .mdai Files

To support dynamic document synthesis and multi-stage research pipelines, amux introduces computed markdown files designated by the .mdai extension amux README. A .mdai file functions as a node in a Directed Acyclic Graph (DAG) produced by AI model execution.

Nodes link to static files, directories, live amux message streams (amux:messages), or upstream .mdai nodes via YAML frontmatter:

---
sources:
  - path: notes/meeting.md
    prompt: Extract decisions and open action items.
  - path: research.mdai
    prompt: Incorporate synthesized background context.
model: claude-haiku-4-5
---
# Synthesis Report
Synthesize decisions and highlight blocking risks based strictly on the linked sources.

When a .mdai node is opened or executed via POST /api/files/mdai/run, amux resolves source dependencies upstream-first, depth-first. The execution runtime includes built-in cycle detection (naming explicit loops if invalid dependencies exist) and input-hash caching amux README. This means that if upstream source contents, prompts, and model definitions remain unchanged, amux serves the cached result instantly without making redundant LLM API calls.


Operational Considerations & macOS System Integration

amux can be deployed on macOS via launchd or on Linux distributions (Ubuntu 22.04+, Debian 11+, Fedora 36+) via systemd user services (amux-server.service, amux-builder.service, amux-builder.timer) amux README.

When operating on macOS, amux interacts with local application layers (such as iTerm2 and Apple Messages) via AppleScript and TCC (Transparency, Consent, and Control) security frameworks. Primary documentation records machine-emitted error signatures across 1.5 GB of fleet logs, demonstrating that automation timeouts and missing permission grants represent the most frequent operational failure modes:

# Verifying server health and local CLI communication
amux-rs --url https://localhost:8824 health

# Adding and claiming tasks atomically via CLI
amux-rs board add "Refactor auth middleware" --type code
amux-rs board doing TASK-101

For developers managing desktop automation, code signing stability (AMUX_CODESIGN_IDENTITY) is required to prevent macOS TCC prompt resets when amux-builder automatically updates server binaries in place amux README.


Selection Guidance & Tradeoffs

  • Choose amux if: You need to run 5 to 50 parallel, unattended AI coding agents overnight with atomic task distribution, self-healing recovery, mobile/web status monitoring, and local-first SQLite persistence amux vs Cline.
  • Choose simpler alternatives (e.g., Claude Squad or DIY tmux) if: You only require 2 or 3 interactive terminal sessions without task board locking, mobile PWA access, or automated crash recovery Best Claude Code Session Managers 2026.
  • Choose IDE extensions (e.g., Cline / Roo Code) if: Your workflow demands step-by-step human tool approval inside VS Code for interactive single-session feature engineering amux vs Cline.

Sources

Primary Documentation

Independent Web Coverage

  • Dan Kornas on X — Technical commentary on parallel agent coordination issues and task overlap.

Source-reported benchmarks

Results reported in the linked sources; compare their workloads and conditions before applying them to your deployment.

No attributable performance or quality benchmark measurements were found in the reviewed sources.

Keep exploring

Agent persistence & workflows: questions, tradeoffs, and guides →

Browse all reports · Suggest a correction