A coding agent that runs parallelizable tasks concurrently and records learnings after each task
An AI-powered software development agent that decomposes tasks into structured, parallelizable execution plans (DAGs), runs concurrent coding agents against each stage, and documents learnings for future sessions. Built on Anthropic's Claude Agent SDK with Bun as its runtime.
Requires Bun v1.3+.
bun install
bun build src/magus.ts --compile
cp node_modules/@anthropic-ai/claude-agent-sdk/cli.js .
This produces a standalone magus binary in the project root, alongside cli.js (the bundled Claude Code runtime required by the Agent SDK). Both files must be kept together.
To run tests:
bun test
# Get help with usage
magus --help
# Read prompt from a file
magus -p prompt.txt
# Pipe prompt via stdin
echo "Add a retry mechanism to the HTTP client" | magus
# Resume a previous session
magus --resume <session-id>
# Run with all flags
magus -p prompt.txt --auto-approve --verbose --hide-tools
| Flag | Description |
|---|---|
-p, --prompt <file> | Read prompt from a file instead of stdin |
--resume <id> | Resume a previous session by its ID |
--auto-approve | Skip interactive plan approval |
-v, --verbose | Show full plan details with dependencies |
-H, --hide-tools | Suppress tool call output in the terminal |
-h, --help | Display help |
Set ANTHROPIC_API_KEY in your environment or in a .env file (Bun loads it automatically).
Magus runs a three-phase pipeline orchestrated by an event-driven async generator architecture.
A Planner agent (Claude Opus) reads the codebase, identifies relevant skills from .magus/skills/, and decomposes the user's request into a directed acyclic graph (DAG) of stages. Each stage has an objective, file targets, acceptance criteria, and explicit dependencies on other stages.
The plan is rendered alongside an ASCII box-and-arrow diagram for review:
┌──────────┐ ┌──────────┐ ┌──────────┐
│ ○ task-a │ │ ○ task-b │ │ ○ task-d │
└──────────┘ └──────────┘ └──────────┘
│ │ │
└──────────────┤ │
▼ │
┌──────────┐ │
│ ○ task-c │ │
└──────────┘ │
│ │
├──────────────┘
▼
┌──────────┐
│ ○ task-e │
└──────────┘
The user can approve the plan, provide feedback to refine it, or reject it entirely. Cyclic dependencies are automatically detected and fed back to the planner for correction.
The Executor drives concurrent stage execution through the DAG. Stages with no unsatisfied dependencies are launched immediately as parallel Coder agents (Claude Sonnet). As stages complete, newly unblocked stages are launched until the entire plan is done.
Each coder agent follows a strict Test-Driven Development workflow:
Coder agents receive context from their completed dependencies, so downstream stages can build on prior work without duplicating effort.
A Scribe agent (Claude Opus) reviews the execution results and writes a memory file to .magus/memories/ documenting what was done, key decisions, and outcomes. It may also create or update reusable skill files in .magus/skills/ when it identifies patterns worth preserving.
Magus maintains a knowledge base across sessions:
.magus/memories/) capture what happened in each session — decisions made, problems encountered, outcomes achieved..magus/skills/) capture reusable technical patterns — how to add CLI flags, data flow through the pipeline, rendering algorithms, testing patterns.Both are written by the Scribe agent and read by the Planner in future sessions, giving Magus a form of persistent learning.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub atelier-arcadia/magus --plugin magusMulti-agent orchestration via li o flow and li o fanout
Autonomous session orchestrator for Claude Code - manages multi-phase development workflows
Describe your goal, approve the spec, then step away — Claude and Codex loop together until it's right.
Plan and autonomously build a software task end-to-end. Recons the codebase, applies preloaded memory, decomposes into the right number of phases, gets one confirmation, then prepares a single ready-to-paste /goal command — one paste between you and done — that drives execution to completion with built-in retry, fix-spec recovery, and per-phase memory writeback. Works on Claude Code and Codex.
Turn Claude Code into a plan-execute-validate loop with parallel work, intelligent retry, and memory
Design fluency for frontend development. 1 skill with 23 commands (/impeccable polish, /impeccable audit, /impeccable critique, etc.) and curated anti-pattern detection.