Firstmate: Talk to one agent. Ship with a crew Firstmate, an open-source agent distro from developer Kunchen Guid, lets users manage a crew of autonomous coding agents through a single liaison agent, with features like disposable git worktrees, event-driven supervision, and optional X integration. The distro, available on GitHub, supports multiple terminal backends and project modes, aiming to simplify parallel coding tasks without requiring a model or CLI installation. You can run one coding agent easily. But the moment you want three project tasks done in parallel - fixes, investigations, plans, audits - you become a tab-juggler: babysitting sessions, copy-pasting context between repos, forgetting which terminal had the failing test. firstmate flips the model. You talk to a single agent - the first mate - and it runs the crew for you: spawning autonomous agents in a visible session backend, giving each a clean git worktree, supervising them to completion, and handing you finished PRs, approved local merges, or standalone investigation reports. For larger fleets, you can opt in to persistent secondmates: second mates that are still ordinary direct reports, but run from their own isolated firstmate homes. firstmate is not a model, not a harness, not a skill, not an MCP server, and not a CLI. firstmate is an agent distro for running a crew of agents. An agent distro is a portable directory of instructions, skills, tooling, policies, and state conventions that turns a general-purpose agent into a specialized one. There is no app to install: the cloned repo is the distro - AGENTS.md , bundled firstmate skills, and helper scripts that any terminal coding agent can follow. Launching a supported harness inside it instantiates your first mate - and makes you the captain. One liaison - you talk only to the first mate; it dispatches, supervises, escalates only real decisions, and reports plain outcomes. A visible crew - every crewmate works in its own tmux window, experimental herdr/zellij tab, cmux workspace, or Orca terminal you can watch or type into; the first mate reconciles. Disposable worktrees - each task runs in a clean treehouse https://github.com/kunchenguid/treehouse git worktree, or an Orca-managed worktree when backend=orca , so parallel work on one repo never collides. Two task shapes - ship tasks deliver authorized changes; scout tasks leave standalone investigation reports when the intake contract warrants separate research. Explicit project modes - each project ships via no-mistakes , direct-PR , or local-only , with an optional +yolo autonomy flag. Optional secondmates - opt in to persistent second mates that run from isolated firstmate homes with their own FM HOME , state, projects, and session lock, supervising project clones or a project-less firstmate-repo domain, kept on the primary firstmate version by guarded local fast-forwards and checked for live agent processes at session start. Event-driven, zero-token supervision - a bash watcher sleeps on the fleet and wakes the first mate only when something needs you; verified primary harnesses also get a turn-end backstop that blocks or follows up on a blind stop when work is under way and supervision is not live. Optional X mode - opt in with one local .env token so firstmate can answer your public @myfirstmate mentions, act on normal reversible mention requests through the same lifecycle as chat requests, acknowledge spawned work, and post up to three public-safe completion follow-ups within seven days for genuine milestones and the final outcome without changing non-X behavior; a final reply promised in a thread becomes durable state that is reconciled from disk, so a restart or a compacted conversation cannot lose it; dry-run preview records would-be replies and dismissals locally before go-live. Strict project boundary - the first mate is read-only over your projects except for the narrow guarded and captain-approved operations authorized by hard rule 1 /kunchenguid/firstmate/blob/main/AGENTS.md 1-identity-and-prime-directives , including fleet sync's guarded safe branch pruning; crewmates make every other project change behind the configured merge authority. Restart-proof - all state lives on disk and in the active session backend tmux by hard default, herdr or cmux when selected or auto-detected, zellij/orca when explicitly selected ; kill the session anytime and the next one reconciles, including confirmed-dead secondmate agents, and carries on. Full detail on every feature lives in docs/architecture.md /kunchenguid/firstmate/blob/main/docs/architecture.md . - A verified primary agent harness: Claude Code, Grok, Pi, pi-signed , Codex, or OpenCode. - Git and the GitHub CLI, authenticated through gh auth login . - The CLI and dependencies for your selected runtime backend; tmux is the reference default. The first mate detects and offers to install supported missing tools after you approve. Backend-specific setup is linked in Documentation documentation . Claude Code, Grok, and Pi are equal co-primary recommendations for running the primary firstmate session, with pi-signed supported as Pi's distinct signed-wrapper identity. Claude Code uses a tracked Stop hook for tokenless watcher re-arm and rewake, Grok uses background-notify wake cycles, and Pi uses its tracked primary watcher extension. All three have verified turn-end guard paths when launched with their documented setup. Pick whichever one matches your subscription and workflow. Codex and OpenCode are also verified and supported as primary harnesses; Codex uses bounded foreground checkpoints, and OpenCode uses a TUI plugin, so both carry more harness-specific supervision tradeoffs than the three co-primaries. gh auth login git clone https://github.com/kunchenguid/firstmate cd firstmate Then launch one of the co-primary harnesses; AGENTS.md takes over from there: Claude Code claude Grok grok --trust Pi pi or, when the signed wrapper is installed FM PI HARNESS=pi-signed pi-signed For Grok, --trust is needed once per clone so project hooks and the turn-end guard load; /hooks-trust inside Grok works too. For Pi, approve the project trust prompt once per clone on first launch so the tracked .pi/extensions/ .ts files auto-load. Pi's /calm toggle hides supported transcript chrome, including canonically classified Firstmate operational user rows, and uses a Calm-only animated working boat during active runs while preserving all model context and session data. The hidden operational inputs remain ordinary user-role messages with unchanged delivery, ordering, authority, persistence, and exports. The preference persists for the effective Firstmate home, and toggling it off restores ordinary rendering. Calm's current behavior and supported limits /kunchenguid/firstmate/blob/main/docs/calm.md are separate from its version-scoped maintainer evidence /kunchenguid/firstmate/blob/main/docs/calm-mode-feasibility.md . ahoy look at my github project xyz, then fix the flaky login test and add dark mode firstmate checks its toolchain asking your consent before installing anything , clones the project under projects/ and spawns two isolated workers in the active backend. Minutes later: PR ready for review, captain: https://github.com/you/xyz/pull/42 fix flaky login test - risk: low - CI green alright merge it Setup guides for tmux the default and every other supported backend herdr, zellij, Orca, cmux are linked in Documentation documentation below. you the captain │ chat: requests, decisions, "merge it" ▼ ┌─────────────────────────────────────┐ │ firstmate this repo │ │ reads projects/ + firstmate routes │ │ writes guarded backlog/briefs/state │ └──┬──────────────┬───────────────┬───┘ │ backend sends / status files │ ▼ ▼ ▼ ┌────────┐ ┌────────┐ ┌────────┐ │fm-task1│ │fm-task2│ ... │fm-taskN│ tmux windows, herdr/zellij tabs, cmux workspaces, or Orca terminals │crewmate│ │crewmate│ │crewmate│ one autonomous agent each └───┬────┘ └───┬────┘ └───┬────┘ ▼ ▼ ▼ treehouse worktree, Orca worktree, or isolated secondmate home │ ├─ ship: project mode ► PR/local merge ► teardown │ └─ scout: report at data/