Docs & Scaling Up
Everything in the multi-agent coordination layer is opt-in. You never need it for everyday cross-harness messaging, shared memory, or handoffs — but it's ready in the same zero-dependency binary when you run parallel worktrees.
Everyday CLI
After running node x-harness/bin/x-harness.mjs init, the x-harness CLI is linked into ~/.local/bin/x-harness.
# Setup & diagnostics
x-harness init # Wire MCP, hooks, skills & CLI shim
x-harness status # Inspect live agents, hooks & DB health
# Built-in 2-line terminal statusline (zero deps)
x-harness statusline # Render statusline for current session
x-harness statusline install # Wire statusline into Claude Code / agy
# Unified cross-harness handoffs
x-harness handoff path --rotate # Archive old latest.md, print fresh path
# Auto-wake idle session without tmux
x-harness watch --name agy-review # Exits 0 with JSON when a message arrivesAll 14 MCP Tools
Exposed over standard stdio MCP to Claude Code, Antigravity, Codex, OpenCode, and Cursor.
Messaging & Presence (8 tools)
| Tool | Purpose |
|---|---|
| inbox_whoami | Show handle, harness, role, workstream, branch, state, and unread count |
| inbox_register | Claim a short handle (e.g. claude-api, agy-review), summary, role, workstream, or PR URL |
| inbox_list_agents | List live sessions across harnesses with role, workstream emoji, state, and who-owes-whom reply status |
| inbox_send | Direct message or "*" broadcast (optional wait_for_reply_seconds + idle tmux auto-wake) |
| inbox_check | Read unread messages (marks read by default) |
| inbox_wait | Block up to 110s until a new unread message arrives |
| inbox_report | Report builder status (working, idle, stuck, needs_input, done + PR URL); logs board event & alerts live coordinator |
| memory_info | Return canonical memory directory, MEMORY.md content, and topic files for the current repo |
Workstream Coordination & Orchestration (6 tools)
| Tool | Purpose |
|---|---|
| coord_status | Read or atomically update workstream status (waiting, broken, in_flight, queued, done), view pending triage answers, and sync optional status-<ws>.md mirror |
| coord_board | Read or append to the workstream's append-only board log (note, report, decision, routed, answer, handback) |
| coord_sessions | List live builder/coordinator sessions in a workstream with state, PR URL, and who-owes-whom status |
| orch_check | Zero-token Orchestrator gate across all workstreams (30m push safety net, 60m stuck lane nudge, queued lane start under caps, dead-coordinator restart) |
| orch_record | Transactionally record an Orchestrator action BEFORE acting (<= 3 lanes/ws, <= 10 lanes/day, <= 1 restart/day; denied halts without retrying) |
| orch_digest | Render a concise <= 40-line cross-workstream rollup digest |
Multi-Agent Fleet CLI
Manage parallel workstreams, answer human triage questions in a single TUI, run zero-token orchestrator checks, and route GitHub PR review/CI events.
# Workstream Coordinator status, board log & live sessions
x-harness coord status [workstream] [--json]
x-harness coord board <workstream> [--append "Decision..." --kind decision]
x-harness coord sessions [workstream]
# Human Triage Inbox (interactive TUI or scriptable CLI)
x-harness triage # Interactive TUI (y/n/r/d/s/o)
x-harness triage --list # Plain-text summary
x-harness triage answer <ws> <id> yes # Instant coordinator wakeup
# Zero-token Orchestrator gate & digest
x-harness orch check --json # 0 LLM tokens when should_wake=false
x-harness orch digest [--mark-looked]
# Cross-harness launcher (tmux or direct) & PR feedback router
x-harness launch --harness codex --role builder --workstream chat --tmux-session dev
x-harness pr-watch --once # Route new CI/review/conflict events via ghLifecycle Hooks
x-harness init wires lightweight hooks by default (pass --no-hooks to opt out). All hooks walk the process ancestor tree so sibling sessions in the same directory stay isolated.
- • SessionStart: memory + handoff + unread
- • PreInvocation: unread delivery
- • PreToolUse: MEMORY.md budget guard
- • Stop: unread continuation w/ loop guard
- • SessionStart: handoff + unread
- • UserPromptSubmit: unread delivery
- • PreToolUse: MEMORY.md budget guard
- • Stop: unread block w/ loop guard
- • session_start: memory + handoff + unread
- • Full stdio MCP support for all 14 tools
4-Layer Architecture
All state, coordination logic, and decision gates live in zero-dependency Node/Bun + SQLite WAL, while every harness integration is a paper-thin adapter.
Claude Code plugin, Antigravity hooks & skills, Codex/OpenCode/Cursor MCP, and terminal views (x-harness status, triage, statusline).
Deterministic zero-token gate (orch check), transactional rate caps (<=3 lanes/ws, <=10/day, <=1 restart/day), and <=40-line rollups.
Git worktree auto-grouping with deterministic FNV-1a emojis, structured workstream_items, append-only board_events, Human Triage TUI, and PR feedback routing.
SQLite WAL (state.db), PID liveness & ancestor-PID scoping, DMs & broadcasts, idle tmux auto-wake, canonical ~/.agents/memory, and once-only handoff pickup.