Runtime backends
tmux, Herdr, Zellij, Orca, cmux and Paseo compared — verification status, how each is selected, what each needs, and which to pick.
The runtime backend is the session manager crewmates live in. It is separate from the harness, which is the agent running inside it. bin/fm-backend.sh resolves the backend; adapters live in bin/backends/.
Selection order#
config/backendorFM_BACKEND, if set.- Auto-detect from where the first mate itself is running, innermost first:
$TMUX→HERDR_ENV=1→ Rex (TERM_PROGRAM=rexwithREX_BLOCK) → cmux markers (CMUX_WORKSPACE_ID) → the Herdr app's terminal signal (hc). - Fallback: tmux.
Zellij, Orca, Paseo, T3 Code and tern are never auto-detected. Select them explicitly. codex-app is not a backend.
Comparison#
| tmux | Herdr | Zellij | Orca | cmux | |
|---|---|---|---|---|---|
| Status | verified reference | verified, own CI lane | experimental | experimental | experimental |
| Worktrees from | treehouse | treehouse | treehouse | Orca itself | treehouse |
| Extra tools | tmux |
herdr, jq |
zellij ≥0.44, jq |
Orca.app + orca CLI |
cmux ≥0.64, jq |
| Task container | window fm-<id> |
tab (or a per-task workspace) | tab in shared firstmate session |
Orca terminal | workspace |
| Agent state | semantic hooks + process probe | native per-pane state + push events | hooks | hooks | hooks |
| Secondmates | ✓ | ✓ (default for remote) | ✓ | refused | refused |
| Away-mode supervisor pane | ✓ | ✓ | refused | refused | refused |
| Platform | anywhere | anywhere | anywhere | macOS | macOS, GUI-first |
tmux — the safe default#
tmux new -s firstmate # then launch your harness inside
tmux attach -t firstmate # later; select fm-<id> windows to watch crewmates
It needs no provisioning. Liveness combines #{pane_current_command} with the foreground process group. Only dead or missing authorizes recovery; a false "dead" is the one thing the probe guards against. Typing into a crewmate window is authoritative intervention.
Herdr — Kun's daily driver#
herdr + firstmate is indeed a great combo. that's my daily driver too. herdr provides the lifecycle management and organization of all the agents. firstmate serves as a single point of contact to orchestrate all of them without going insane. — @kunchenguid, 2026-09-09
Herdr is an agent-native terminal with per-pane agent state and push events (pane.agent_status_changed). Firstmate gets real blocked and busy events instead of pure polling, which is also what made the RGB-lamp integration possible.
- Requires protocol ≥14. The default-on presentation spaces (one disposable workspace per task) need ≥0.8.0;
config/herdr-presentation-spacesturns them on or off. - Opt-in
config/herdr-project-groups(on, or rule lines mapping task-id prefixes and repos to groups) adds display-only group and status tags. It sorts Herdr's agents view by group, then status. It needs protocol 22 and is inherited by secondmates. - One workspace per home, one tab per task, placed beside the launching agent's workspace.
- It is the default backend for remote secondmates. Rex can host one too, only when explicitly selected (
--backend rex) andfm-remote-doctor.shreports the host ready. Herdr's remote-session server belongs to the host's GUI login, so agents survive SSH drops. - Gotchas are listed in Troubleshooting.
Kun on why Herdr fit: it maps secondmates to spaces and groups crewmates under them, with event-driven updates (2026-07-03).
Zellij#
It is experimental. It uses one shared session (FM_ZELLIJ_SESSION, default firstmate) with one tab per task. Tab titles are home-scoped (fm-<hometag>-<id>) so multiple homes don't collide. Gotcha: pane_cwd freezes at the shell's cwd from before a nested shell like treehouse get.
Orca#
It is experimental and macOS-only. Orca uniquely owns both the worktree and the terminal, so no treehouse is involved. After firstmate's checks pass, teardown runs orca worktree rm. Spawning requires orca status --json to report reachable=true, state="ready". There is no Escape key support and no secondmates. config/launch-env-allowlist alone cannot scope worker credentials on Orca: allowlisted values resolve from the Orca terminal's own environment. A nonempty allowlist prints a warning unless config/launch-env-tmux-session is set. --relaunch is refused on Orca. Load the firstmate-orca skill before operating it.
cmux#
It is experimental, macOS-only and GUI-first, so it is unsuitable over SSH. It uses one workspace per task. Set Socket Control Mode to automation (recommended) or password (config/cmux-socket-password). Gotchas: surface cwd is frozen at creation, and read-screen fails on a never-written surface until the first send. No secondmates.
Paseo#
It is experimental, with no dedicated real-backend CI lane, and added on 2026-10-20 (bin/backends/paseo.sh, docs/paseo-backend.md). Select it only with config/backend, FM_BACKEND=paseo or --backend paseo. Paseo markers in the environment are ignored. Worktrees come from treehouse. Each task is a terminal tab in one shared workspace per project. Secondmates, exit/relaunch and Command Code launches are refused.
Rex#
It was added on 2026-10-22 (bin/backends/rex.sh, docs/rex-backend.md). Rex is auto-detected, after tmux and Herdr and before cmux. A nested tmux or Herdr is never read as Rex. Worktrees come from treehouse. Each task is one tab, in the first mate's own Rex session or in one session per home. fm-control exit and relaunch work on Rex. Kun: "i just got into Rex beta, so... firstmate now has full support for Rex!" (2026-10-23).
The Rex server must run on the same machine as firstmate. A new spawn is accepted only when rex whoami --json reports a unix:// endpoint. Any other endpoint, including local TCP, or an unreadable one is refused before a tab is created or a worktree is leased. For workers on another host, use remote second mates (on main, 46df160).
After testing Rex, Kun wrote "tl;dr i think i'll stick with herdr for now". His sticking point: "it's a middle ground between GUI and TUI", so it gives neither rich GUI visuals nor plain-SSH keyboard access (2026-11-01).
Two opt-in local settings are not inherited by secondmates. config/rex-status-marks (on or off, default off) shows a program-status badge and a notification on the pane of a worker that needs the captain. config/rex-tint (off, subtle or subtle-light) tints waiting and failed workers.
T3 Code#
It is experimental and was added on 2026-10-24 (bin/backends/t3code.sh, docs/t3code-backend.md). Select it explicitly. T3 Code owns the agent session and treehouse owns the worktree. It runs only the claude and codex harnesses. Nothing is typed into a terminal and there is no composer. fm-afk-launch.sh start refuses there, so a Codex captain hosted by T3 Code has no away daemon.
tern#
It is experimental and was added on 2026-10-26 (bin/backends/tern.sh, docs/tern-backend.md). Select it only with config/backend, FM_BACKEND=tern or --backend tern. TERM_PROGRAM=tern and TERN_PANE reach every process started inside a Tern block, so they never select it. Worktrees come from treehouse. Native busy, idle and blocked state comes from tern ctl; without it the state is unknown. Secondmates and Command Code launches are refused.
hc (herdr-core)#
It is experimental and was added on 2026-10-30 (bin/backends/hc.sh, docs/hc-backend.md). herdr-core is the terminal core under Herdr.app, not Herdr 1. It is auto-selected only when firstmate's own HC_TERMINAL_ID terminal has a non-empty herdr.space label (a Herdr app terminal) on the running HC_SESSION (else default) core. Bare HC_TERMINAL_* markers or an open app window never select it. An explicit --backend, FM_BACKEND or config/backend still wins. Worktrees come from treehouse. Each task is one login-shell terminal. Meta records hc_session= and hc_terminal=. Secondmates are refused.
It needs herdr-core 0.1.14 or newer (hc x.y.z) speaking protocol generation 1. The binary is FM_HC_BIN, else herdr-core on PATH, else hc. bin/fm-install-hc.sh installs the pinned, checksum-verified build. It now has a tests-hc CI lane (95f006f).
Which to pick#
- Just starting: tmux. It is the most tested and needs nothing extra.
- You'll run many agents daily, or want remote secondmates: Herdr.
- You already live in Zellij, Orca or cmux: they work, but "experimental, no dedicated real-backend CI lane".