Development

CMUX

Drives cmux as an agent cockpit to boot, race, and monitor visible agent teams.

04
Workflows
01
Tool
01
Reference
15
Triggers

Key Points

  • Mac-only
Not for one-shot in-harness subagents with no terminal to watch (use Agent/Workflow), the Pulse dashboard itself (cmux feeds it, use Pulse), browser deploy-verification (use Interceptor), or Linux/Windows (cmux is Mac-only — use tmux)

Inside the Skill

The thinking, frameworks, and architecture that distinguish this skill from a generic version of the same task.

Quick Reference

CT=~/.claude/skills/CMUX/Tools/cmux.ts
bun $CT ping # ensure cmux is up (auto-launches)
bun $CT boot-team --name debug --tiers orchestrator,lead,worker,worker
bun $CT race --feature login-500 --agents 4 # first-to-solve wins
bun $CT fleet --name alpha --grid 2x2 --cmds "claude;codex;claude;bun test --watch"
bun $CT mini-fleet # SSH panes from USER fleet.json
bun $CT send --surface workspace:1/surface:2 "run the tests" --enter
bun $CT read --surface workspace:1/surface:2 --lines 40
bun $CT monitor --workspace workspace:1 # poll + {{DA_NAME}} voice on done
bun $CT flash --workspace workspace:1 # visual attention

The loop that makes it work: send (type a prompt) → send-key Enter (submit — --enter does both) → read (see the result) → close-surface (tear down). That send/read/open-close cycle is the whole programmatic-access story; the recipes are just it, composed.

What stays underneath (not replaced): Pulse (localhost:31337) is still the dashboard, {{DA_NAME}} voice still fires via /notify, the Algorithm/ISA/memory/model-routing are untouched. cmux replaces the terminal-watching layer, not the system. See DESIGN.md for the full feature map and the staged Kitty→cmux migration.

Gotchas

  • send types but does not submit. cmux send puts text in the surface; it does not press Enter. Always use --enter (or a follow send-key Enter) when you mean to run the prompt, then read to confirm it actually ran. A send with no Enter that claims "the agent is working" is a false done-claim.
  • The socket is default-DENY — this is the #1 gotcha. Even while the app runs, an outside process gets Access denied — only processes started inside cmux can connect. Two ways through: (a) run the orchestrator inside a cmux surface — it inherits auth via a tagged CMUX_SOCKET_PATH env, no password; or (b) set a socket password in cmux Settings and export it as CMUX_SOCKET_PASSWORD (the wrapper passes --password). The socket also only exists while the app runs (cmux.sock absent when closed). Pick (a) for agent-driven work, (b) for external scripting.
  • cmux is push-native — prefer hooks over polling. Launch Claude agents with cmux claude-teams and cmux auto-injects Claude Code lifecycle hooks (SessionStart/Stop/Notification/UserPromptSubmit/... → cmux claude-hook <event>), so agents report their own status. Also available: tmux-style set-hook <event> <cmd>, a blocking wait-for -S <name>, pipe-pane --command, and OSC 9/99/777 escapes. monitor's surface-health + read-screen poll is the FALLBACK for non-Claude agents, not the primary path.
  • Sidebar metadata is a no-auth Pulse bridge. report_meta / report_meta_block / set-status / set-progress / log write agent status/progress into the workspace sidebar and persist to the session JSON at ~/Library/Application Support/cmux/session-*.json — which is readable without the socket. LifeOS reads that file to mirror cmux agent state into Pulse without touching the auth wall.
  • Mac-only. cmux is a macOS app. The remote fleet still runs LifeOS, but cmux drives it via local SSH panes, not by running cmux on the minis. No Linux/WSL — that path is tmux.
  • Refs are positional and can shift. workspace:1/surface:2 indexes move as you open/close things. For anything long-lived, resolve UUIDs (--id-format uuids) from tree and hold those.
  • Public skill — private specifics live in USER config. The remote fleet's hosts come from ~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/CMUX/fleet.json ({"hosts":[{"name","ssh"}]}), never from this skill's files. The socket password comes from CMUX_SOCKET_PASSWORD.

Examples

Boot a debugging team and drive the lead:

User: "boot a cmux team to chase the flaky test"
→ bun $CT boot-team --name flaky --tiers orchestrator,lead,worker,worker
→ bun $CT send --surface <lead-ref> "find why auth.test.ts flakes; delegate repro to a worker" --enter
→ bun $CT monitor --workspace <ws> # {{DA_NAME}} voice when the lead reports back

Race a production hotfix:

User: "prod login is 500ing — race it"
→ bun $CT race --feature login-500 --agents 4
→ (four agents attack the same repo; first with a root cause wins)
→ bun $CT read --surface <winner>; close the losers

Full reference for the migration and feature map: DESIGN.md.

Workflows & Routing · 4

Each workflow is one job the skill runs. The trigger phrases route your request to the right one — this is the skill's routing table.

  1. 01
    `Workflows/BootTeam.md` Workflows/`Workflows/BootTeam.md`.md

    boot a team, 3-tier team, orchestrator/lead/workers

  2. 02
    `Workflows/AgentRace.md` Workflows/`Workflows/AgentRace.md`.md

    race agents, hotfix race, throw N agents at this, needle in a haystack

  3. 03
    `Workflows/Fleet.md` Workflows/`Workflows/Fleet.md`.md

    fleet, 2x2 fleet, named teams, the remote fleet, mini-fleet

  4. 04
    `Workflows/Monitor.md` Workflows/`Workflows/Monitor.md`.md

    watch/monitor my agents, tell me when theyre done, observe to improve

Tools · 1

Deterministic executables the workflows call — the code that does the real work, not prompt scaffolding.

  • cmux.ts

How to Invoke

Say any of these to your DA and LifeOS activates the CMUX skill automatically:

  • "cmux"
  • "agent cockpit"
  • "boot an agent team"
  • "orchestrate agents"
  • "three-tier orchestration"
  • "agent race"
  • "needle-in-haystack hotfix"
  • "agent fleet"
  • "2x2 fleet"
  • "watch/monitor my agents"
  • "scale compute to scale impact"
  • "send a prompt to a running agent"
  • "multiplexer"
  • "terminal cockpit"

Or invoke explicitly:

Skill("CMUX")

References · 1

Auxiliary files the skill loads at runtime — frameworks, guides, configs.

  • DESIGN

Want LifeOS to do this for you?

Install LifeOS on your machine — your DA gets the CMUX skill plus 55 others, all hooked into one Life OS.