tm-agentlisted
Install: claude install-skill x-mesh/term-mesh
# tm-agent — Agent Team Control
`tm-agent` is the team management CLI for term-mesh. It lets any pane (leader or agent) spawn, message, and coordinate other agents that run as split panes or headless daemon subprocesses.
A **team** is a named group of agents sharing a workspace, a socket, a task board, and an inbox. The team's **leader** dispatches work; **members** execute, report, and message back.
## Detect you are inside term-mesh
```bash
[ -n "$TERMMESH_SOCKET" ] && echo "inside term-mesh"
# or
[ -S /tmp/term-mesh.sock ] && echo "daemon running"
```
If neither is true, `tm-agent` commands will fail. Outside term-mesh there is no team coordination surface — use plain `claude`/`codex`/etc. directly instead.
Environment variables injected into every pane inside a team:
- `TERMMESH_SOCKET` — unix socket path for RPC
- `TERMMESH_TEAM` / `TERMMESH_TEAM_NAME` — current team
- `TERMMESH_AGENT_NAME` — this agent's name (empty for leader pane)
- `TERMMESH_PANEL_ID` / `TERMMESH_WORKSPACE_ID` / `TERMMESH_WINDOW_ID` — routing ids
## Two ways to build a team
### 1. `tm-agent create` — spawn a new workspace with a full team
```bash
# 3 claude agents in a brand-new workspace, REPL leader on the left
tm-agent create 3
# Adopt the current pane as leader (no new leader pane created)
tm-agent create 3 --adopt
# Custom roles
tm-agent create --roles "explorer,executor,reviewer"
# Use a preset
tm-agent create --preset standard
# Headless (no GUI panes — daemon-managed subprocesses