loom CLI & loom mcp reference
Loom exposes one inbound control bus with two faces. Use whichever fits your context — they
route to the same operations over the unix socket at $LOOM_SOCK:
loom <subcommand>— shell out from inside a pane. Always available; the pane’s child getsLOOM_SOCK/LOOM_PANE/LOOM_BINinjected and the CLI onPATH.loom mcptools — model-native tools, if the MCP server is wired into your agent. Same ops, same routing.
Panes are addressed by their display name (get names from list). These commands only work
from a process launched inside a Loom pane; outside Loom ($LOOM_PANE empty) they are inert
no-ops by design.
loom CLI
Section titled “loom CLI”# Panesloom list # every pane: name, live/dead, workspace, * = focusedloom send <pane> <text...> [--no-enter] # type text into a pane, Enter by defaultloom send <pane> # no text → reads stdin (pipe-friendly)loom spawn [--name N] [--cwd D] <command...> # open a new pane running a commandloom read <pane> [-n LINES] # capture the tail of a pane's scrollback (default 50, max 2000)loom broadcast [--workspace W] [--no-enter] [--dry-run] <text...> # send to every live paneloom focus <pane> # switch to the pane's workspace and focus it
# Signallingloom attention [pane] [--clear] # raise/drop a pane's amber "needs you" borderloom status [pane] <text...> | [pane] --clear # set/clear a pane's short status labelloom role [pane] <name> | [pane] --clear # tag a pane's role (targetable as role:<name>)
# Fleet coordinationloom note set|get|list|del <key> [value...] [-w WS] # the shared per-project blackboardloom claim <path> # advisory file lock ("I'm working here")loom release <path> [--force] # release a claim (--force breaks someone else's)loom claims # list current claims (path + holder)loom hold <path> # gate a path behind a humanloom gate [pane] [--reason R] | --clear | --list # hold a pane's inbound bus inputloom ask <pane> <question...> [--timeout S] # request/response RPC; waits for a reply (default 300s)loom reply <id> <answer...> # answer an ask (id from the "[loom ask #N ...]" prompt)
# Task boardloom card add <title...> [-p PROMPT] [-c CMD] [-w WS] # add a To-do card to the task boardloom card list [-w WS] # list cards: id, title, statusloom card move <id> <todo|done|failed> [-w WS] # move a card between lanesloom card drain <on|off> [--cap N] [-w WS] # auto-dispatch To-do cards, keeping N panes busy
# Agentsloom hooks [--print] | --install [--user|--project] # install Claude Code lifecycle hooksDetails & gotchas
Section titled “Details & gotchas”send— everything after the pane name is joined with spaces and typed, then Enter. Use--no-enterto leave the line unsubmitted. With no text it reads stdin, soecho "prompt" | loom send Cleoandgit log | loom send Cleowork.spawn— the first non-flag token starts the command; everything after it is taken verbatim (dashes included), soloom spawn --name worker claude --resumeworks. End flag parsing with--to be explicit:loom spawn --name w -- claude --resume. Returns the spawned pane’s name.read— an explicit, requested read of scrollback (-n/--linesto bound it). Loom still never watches the stream; you asked for a snapshot.broadcast— fans text to every live pane in the active workspace (-wtargets another). Agent-driven only — there is no human broadcast bar.attention/status/role— with no pane argument they target your own pane ($LOOM_PANE), so an agent can flag itself blocked, label what it’s doing, or tag its role. Lead with--if the text starts with a dash. The attention border clears when the pane is focused. A role is a routing target:loom send role:reviewer ….note— the shared per-workspace blackboard (set/get/list/del), stored under the project’s.loom/. Agents leave each other durable key/value notes.claim/release/claims/hold— advisory file locks so agents don’t collide;holdgates a path harder. Surfaced in the Fleet panel.gate— hold a pane’s inbound bus input behind a human (--reasonto explain,--listto see gated panes,--clearto release). Honoring holds is a Settings toggle (on by default).ask/reply— a blocking request/response between panes.askwaits for an answer (default timeout 300s) and exits non-zero on timeout;reply <id>answers, using the id from the[loom ask #N …]prompt.card— the operator’s task board, a docked Kanban. Cards are project-scoped in the repo’s.loom/board.json, so they travel with the repo.card addreturns the new card’sid; a worker closes its own card withcard move <id> done. Only the operator dispatches a card into a pane; an agent can create, list, and move cards but not spawn from one.card drain— arms the board’s auto-drainer: whileon, Loom keeps dispatching top To-do cards into fresh panes until In-progress reaches--cap(default 3), then refills a slot as each finishes. This is the swarm loop. Drain is session-only (never persisted).hooks— prints or installs the Claude Code hooks profile (--install --projectis the default;--userinstalls into~/.claude/settings.json). Idempotent. The profile wires six lifecycle events —SessionStart,UserPromptSubmit,PostToolUse(edits),Notification,Stop,SessionEnd— onto Loom’s Session/Task/Approval model. The agent pushes its state; Loom never parses output. See Agents, MCP & hooks.
loom mcp tools
Section titled “loom mcp tools”The same operations as first-class tools (target is a pane display name):
| Tool | Args | Does |
|---|---|---|
list_panes |
— | List every pane (name, workspace, focused, live). |
send_text |
target, text, enter?=true |
Type text into one pane. |
spawn_pane |
command, name?, cwd? |
Open a new pane running command. |
read_pane |
target, lines?=50 (max 2000) |
Read the tail of a pane’s scrollback. |
broadcast |
text, enter?=true, workspace? |
Send to every live pane in a workspace. |
focus_pane |
target |
Reveal & focus a pane, switching workspace. |
flag_attention |
target?=self, clear?=false |
Raise/drop a pane’s amber border. |
set_status |
target?=self, text? |
Set a pane’s status label (empty text clears). |
card_add |
title, prompt?, command?=claude, workspace? |
Add a To-do card; returns its id. |
card_list |
workspace? |
List cards (id, title, status: todo|dispatched|done|failed). |
card_move |
id, status (todo|done|failed), workspace? |
Move a card between lanes. |
card_drain |
on, cap?=3, workspace? |
Auto-dispatch To-do cards, keeping cap panes busy. |
flag_attention and set_status default to your own pane ($LOOM_PANE) when target is
omitted. card_* default to your pane’s workspace when workspace is omitted.
Common patterns
Section titled “Common patterns”# Delegate a task to a peerloom send Cleo "run the integration suite and report back"
# Spin up a helper agent, then brief itloom spawn --name reviewer --cwd /repo claudeloom send reviewer "review the diff on branch X"
# Flag yourself blocked so the human noticesloom attentionloom status "waiting on API key"
# Queue work, then launch the swarm on itloom card add "Migrate auth to v2" -p "port src/auth to the v2 API and run the suite"loom card drain on --cap 4Keep it courteous: send / broadcast type into another terminal — prefer --no-enter if a
human should review before it runs.