Advanced Patterns: ACPX, Loops, and Orchestration
Background agents, fan-out pipelines, loop patterns, and multi-agent orchestration at scale.
The Multi-Agent Architecture
At scale, Claude Code is an orchestrator, not just a coder. You manage a fleet of specialized agents, routing work to the right tool for each job.
Key architectural principle: keep the main session clean. Main context is for planning, decisions, and progress tracking. All implementation goes to subagents.
ACPX Patterns
ACPX (Autonomous Claude Process eXchange) enables three core patterns:
Background agents — long-running tasks that execute while you continue other work. Start them, monitor via status checks, review results when complete.
Fan-out — dispatch N agents in parallel on independent subtasks, collect results. Classic for audits, bulk transforms, and multi-file analysis.
Pipeline — chain agents where each step feeds the next. Useful for ETL, multi-stage review, and sequential build processes.
Loop Patterns
The /loop command runs a prompt on a recurring interval:
/loop 10m /status-update
Use loops for: monitoring dashboards, polling for CI results, periodic health checks, and keeping long-running sessions alive.
Overnight Runner
For batch jobs that shouldn't block your day:
- Define the task list in a structured format
- Save session state with
/save-session - Compact context
- Execute methodically step-by-step overnight
The overnight-runner skill provides the exact framework for this pattern.
Orchestration with Neo
In the clawd system, complex multi-agent work routes through Neo (the orchestrator). Neo creates Paperclip tasks, assigns agents, monitors progress, and reviews outputs.
Build your own orchestrator by giving an agent: a task queue, execution authority over workers, and a reporting channel. The pattern scales to dozens of parallel agents.