Operations

/cmux-agents

Spawn AI workers in cmux via MCP/repoGolem. Triggers: visible workers, terminal agents, orchestration, audits.

$ golems-cli skills install cmux-agents
Good
100% best pass rate
149 assertions
38 evals
1 workflow

Updated 5 days ago

Orchestration layer for AI agents in cmux panes. Low-level pane operations (splits, reads, sends) use cmuxlayer MCP tools — this skill handles the workflow on top.

Naming: cmux is the terminal app/CLI; cmuxlayer is the MCP/managed-agent/orchestration layer this skill drives. The MCP tools keep the literal mcp__cmuxlayer__* namespace (and .mcp.json server key cmux) for back-compat, but the layer is called cmuxlayer — never cmux MCP, cmux.layer, or cmux layer. See /cmux → "cmux vs cmuxlayer".

Fleet Law Pointers

Fleet law: canon #5 owns model policy, #6 owns launcher naming/skip-perms, and #7 owns claim/guard/DONE/harvest-close. This skill keeps cmux pane mechanics, worker lifecycle controls, and delivery/recovery adapters.

Monitor/cron/loop-payload details → see cron-payload-discipline. Launcher/-s/-m details → see repogolem. Engine routing → see agent-routing.

ROLE GEOMETRY — leads/orchestrators land LEFT, workers land RIGHT (automatic)

Why this exists (2026-06-14): the cmux skill/MCP setup kept confusing agents about geometry — who goes where, and how to avoid hand-placing panes. The cmuxlayer layout policy (PR #156) now enforces a two-column invariant by ROLE, so you should stop hand-managing left/right and just pass the role.

  • Leads / orchestrators → LEFT column. Role orchestrator. Default inferred from a *Claude launcher title.
  • Workers (Codex/Cursor implement+gather) → RIGHT column. Role worker. Default inferred from *Codex / *Cursor titles.
  • Pass the role, don't compute the column. spawn_agent, new_split({role}), and spawn_in_workspace place by role automatically. Once two columns exist, additional workers dock as TABS in the rightmost worker pane — never a third column.
  • spawn_in_workspace is the clean team stand-up: one call creates the workspace and lays out commanders-LEFT / workers-RIGHT atomically. Prefer it over a sequence of spawn_agent calls when standing up a multi-agent team.
  • Auto-focus is handled for you (PR #156). Workspace-targeted splits focus the target before splitting and restore your focus after render. You no longer hand-run focus-pane around every split — but focus:true is still REQUIRED on role-based new_split (role placement rejects focus:false).
  • Engine routing rules → see agent-routing (canonical). cmux-agents only maps the chosen role to pane placement.

Default Lifecycle (2026-04-19)

Visible worker peers now use the agent-based cmuxlayer MCP tools by default:

  1. mcp__cmuxlayer__spawn_agent({repo, cli, prompt, workspace?, parent_agent_id?})
  2. Capture the returned agent_id immediately and write it into your collab / AGENT_REGISTRY.
  3. mcp__cmuxlayer__wait_for({agent_id, target_state, timeout_ms}) for lifecycle gates.
  4. mcp__cmuxlayer__send_to_agent({agent_id, text, press_enter}) for follow-ups.
  5. mcp__cmuxlayer__get_agent_state({agent_id}) for a combined registry + parsed-screen snapshot.
  6. mcp__cmuxlayer__list_agents(...) or mcp__cmuxlayer__my_agents(...) whenever topology changes.
  7. mcp__cmuxlayer__stop_agent({agent_id}) to stop or recycle a worker.

Reference agents by agent_id, not surface index. Surface IDs drift after crashes, respawns, and pane reuse; agent_id is the durable handle. Surface refs still matter for raw inspection (read_screen) and non-agent panes (new_surface, browser tabs), but not for the default worker lifecycle.

Workflows

/cmux-agents:prompt-audit