cmux — AI-Native Terminal Multiplexer
Skill by ara.so — Daily 2026 Skills collection
cmux is a terminal multiplexer with a programmable socket API designed for AI coding agents. It provides full Playwright-equivalent browser automation, real-time terminal split management, sidebar status reporting, and agent team coordination — all via a simple CLI.
What cmux Does
- Terminal splits — create side-by-side or stacked panes, send commands, capture output
- Browser automation — full headless Chromium with snapshot-based element refs (no CSS selectors)
- Status sidebar — live progress bars, log messages, and icon badges visible to the user
- Notifications — native OS notifications from agent workflows
- Agent teams — coordinate parallel subagents, each with their own visible split
Orient Yourself
Environment variables set automatically:
$CMUX_SURFACE_ID— your current surface ref$CMUX_WORKSPACE_ID— your current workspace ref
Handles use short refs: surface:N, pane:N, workspace:N, window:N.
Terminal Splits
Create splits
Always capture the returned surface_ref:
Send commands and read output
Golden rule: never steal focus. Always use --surface targeting.
Worker split pattern
Pane management
Browser Automation
cmux embeds a full headless Chromium engine with a Playwright-style API. No external Chrome required. Every command targets a browser surface by ref.
Workflow pattern
Open and navigate
Capture the surface ref:
Snapshot and element refs
Instead of CSS selectors, snapshot to get stable element refs (e1, e2, ...):
Refs are invalidated after DOM mutations — always re-snapshot after navigation or clicks. Use --snapshot-after to auto-get a fresh snapshot:
Interact with elements
Wait for state
Read page content
Locators (Playwright-style)
JavaScript evaluation
Frames and dialogs
Cookies, storage, and state
Authentication flow
Diagnostics
Script and style injection
Sidebar Status and Progress
Show live status to the user without interrupting their flow:
Notifications
Agent Teams with cmux
Use cmux splits to give each agent teammate a visible workspace. Coordinate via SendMessage and task lists — never via reading each other's terminal output.
The pattern
- Create splits for each teammate
- Spawn teammates via Agent tool — pass each their cmux surface ref
- Teammates run commands in their split via
cmux send-surface - Teammates report status via
cmux set-statusandcmux log - User sees all work side-by-side
Example: 3-agent team
Then in each teammate's prompt:
Mixed layout: terminals + browsers
Key rules
- Never spawn
claude -pin splits — use the Agent tool withteam_nameinstead - Create splits before spawning teammates — pass refs in their prompts
- One split per teammate — each owns their visible workspace
- Coordinate via SendMessage, not by reading each other's terminal output
- Clean up:
cmux close-surface --surface <ref>when done


