Kahn turns a task graph into parallel Claude Code sessions, runs them in dependency order, and verifies each step with shell exit codes — not vibes. When two agents touch the same file, the scheduler resolves it automatically.
/01Agent fleets fail because they cannot see each other.
Two agents editing the same file is not a merge problem. It's an observability problem. You cannot parallelise work you cannot see. Ask an agent whether it is done and it will tell you yes. Every time. KAHN's wedge is the refusal to trust that answer.
/02The mechanism. Three invariants.
STEP 1 — SCAN
Walk a directory recursively. Trace every prompt block and agent invocation. Build a dependency graph from depends_on annotations. Reject cycles. Produce a dag.json to .kahn/state/.
→ invariant I-1: Scope never writes to state
STEP 2 — SCHEDULE
Walk the DAG in topological order. Each node has a touches set (files it reads/writes). If two nodes in the same tick have overlapping touches, defer one to the next tick. Topological order enforced; cycles rejected.
→ invariant I-2: Schedule respects order
STEP 3 — VERIFY
Execute each node. Evaluate its done_when condition (shell expression, usually exit 0). If it passes, mark done. If it fails, Ralph (the retry loop) retries with exponential backoff. If done_when never satisfies, fail.
→ invariant I-3: Verify by exit code
/03Scope — the read-only projection.
Everything you see is derived from .kahn/state/. Scope cannot write to state. It cannot lie about state. It is a window, not an operator.
kahn-scoperun #8f2arunning00:14:22 elapsed
progress tracker shows convergence
active node pulses at heartbeat
read-only log tail streams plausible output
git clone https://github.com/kahn-hq/kahn.git
cd kahn
docker compose up
open http://localhost:7070
/04Self-host in 90 seconds.
The orchestrator, Scope, and a demo DAG. Apache-2.0. No telemetry. No phone-home. Your agents. Your filesystem. Your rules.