Your Coding Agent Needs a Middle Manager
firstmate exists to stop you from becoming a terminal tab-juggler when parallel agents fix, audit, and plan in the same repo.

What it does
firstmate is essentially a well-organized layer of glue code: bash scripts, AGENTS.md instructions, and conventions that turn a supported terminal coding agent—Claude Code, Grok, Pi, Codex, or OpenCode—into a fleet supervisor. You chat with the “first mate,” and it spawns autonomous “crewmates” in separate session endpoints such as tmux windows, herdr or zellij tabs, cmux workspaces, or Orca terminals. Each crewmate works in a disposable git worktree via treehouse or Orca, so parallel tasks on one repo never collide. The first mate handles dispatch, supervision, and reconciliation, surfacing finished PRs, approved local merges, or investigation reports.
The interesting bit
Supervision is deliberately stingy: an event-driven bash watcher sleeps on the fleet and wakes the first mate only when a decision needs you, burning zero tokens while waiting. Optional “secondmates” can run as persistent domain supervisors from their own isolated firstmate homes, kept in sync by guarded local fast-forwards. It is a surprisingly stateful, restart-proof coordination layer built almost entirely on shell scripts, git worktrees, and session backends.
Key highlights
- One liaison: you talk to a single agent; it dispatches, supervises, and escalates only real decisions.
- Visible crew: every crewmate works in its own tmux/herdr/zellij/cmux/Orca endpoint that you can watch or type into.
- Disposable worktrees: parallel tasks use clean git worktrees so branches and tests never step on each other.
- Two task shapes:
shiptasks deliver changes;scouttasks investigate and leave reports. - Guarded by construction: the first mate stays read-only over your projects except during guarded clone refreshes, safe branch pruning, and approved merges.
- Optional X mode: with a single token, the fleet can answer public
@myfirstmatementions and post completion follow-ups. - Restart-proof: all state lives on disk and in the active session backend; kill the session and the next one reconciles.
Caveats
- The herdr and zellij backends are marked experimental, and herdr specifically carries “known gaps” per the docs.
codex-appis explicitly noted as not a runtime backend yet.- The whole system is a bash-heavy orchestration layer, not a standalone app; it requires a verified agent harness and git auth to function.
Verdict
If you already live in Claude Code or Grok and wish you could parallelize tasks without opening six terminals, firstmate is a clever force multiplier. If you want a polished GUI or a single binary that works without an existing agent subscription, this is not your ship.
Frequently asked
- What is kunchenguid/firstmate?
- firstmate exists to stop you from becoming a terminal tab-juggler when parallel agents fix, audit, and plan in the same repo.
- Is firstmate open source?
- Yes — kunchenguid/firstmate is open source, released under the MIT license.
- What language is firstmate written in?
- kunchenguid/firstmate is primarily written in Shell.
- How popular is firstmate?
- kunchenguid/firstmate has 1k stars on GitHub.
- Where can I find firstmate?
- kunchenguid/firstmate is on GitHub at https://github.com/kunchenguid/firstmate.