@cotal-ai/cmux
The cmux integration: a thin driver over the cmux CLI (open/close a tab, send keys) plus a
self-registering cmux Runtime provider. Importing it registers the runtime with the core
Registry, so the manager can spawn agents into cmux tabs without depending on this package.
Tier: extensions/. Peer-depends @cotal-ai/core; self-registers on
import.
Install it into the published CLI, then select it explicitly:
cotal ext add @cotal-ai/cmux
cotal supervise --runtime cmux
Library composition roots can instead import "@cotal-ai/cmux" directly.
Each agent's env is written to an owner-only launch script, which keeps it off the tab's command, and the script removes its directory before it starts the agent. When it cannot remove the directory, the agent does not start.
Lifecycle waits poll cmux's exact workspace inventory. Closing the workspace authoritatively tears down its terminal and child; an unreachable app fails the wait closed. cmux does not expose child completion while a workspace remains open, so that case times out rather than reporting a false exit.
Workspace listing and label lookup use the same one-second CLI read bound as lifecycle probes.
A missing executable, socket error or timed-out query throws; only a successful empty listing
means there are no matching workspaces. The exported listWorkspaces keeps the CLI's default
line format, and state probes request both short refs and UUIDs.
See docs/architecture.mdx (Manager supervision) and the root AGENTS.md for the tier rules.