Runtime backends
tmux, Herdr, Zellij, Orca and cmux 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→ cmux markers (CMUX_WORKSPACE_ID). - Fallback: tmux.
Zellij and Orca 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 | ✓ | ✓ (required 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. - One workspace per home, one tab per task, placed beside the launching agent's workspace.
- It is the only backend for remote secondmates. Its 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. 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.
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".