Run a crew of Claude Code and Codex workers from one lead session: visible tmux panes, exact state from hooks, one local SQLite store.
Run a crew of Claude Code and Codex workers from one lead session: visible tmux
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
- Visible workers: each one is a real tmux pane you can read and type into.
- Exact state: workers report it through their own CLI's hooks, so nothing polls.
- One local SQLite store: no daemon. The MCP server, hooks, and scheduler make no outbound requests; the CLI contacts npm only to check for updates, and upgrades can download (details).
Install
Requirements: macOS, Node ^22.14.0 || >=23.6.0, Claude Code, and tmux for the agent tools. codex is optional, only needed if a project opts a worker into it; see docs/install.md.
Working from a clone instead? See docs/install.md.
Put ~/.local/bin on your PATH below your version manager's block. See Node version and the interpreter pin for why the order matters.
First run
Run cd ~/Code/your-project && hive. It is shorthand for hive lead, and it opens a lead window running Claude in this project's tmux session, with the lead session named after the project so your other Claude Code sessions can address it by that name; ask it to triage, and it reads the standing process and proposes work. Spawn workers with agent_spawn, and watch or take over any of them with tmux -CC attach -t hive-main (or plain tmux attach).
How it works
Each Claude Code session runs its own hive MCP server over stdio, and every instance reads and writes one SQLite database (WAL mode) at ~/.hive/hive.db, so every session sees the same state. There is no daemon. The MCP server, hooks, and scheduler make no outbound requests; the CLI contacts npm only to check for updates, and upgrades can download (details). State is scoped to a project (a directory), resolved from the working directory; a lead spawns workers into tmux panes locked to that project.
Why not subagents?
| | Subagents | hive workers |
|---|---|---|
| Visibility | report at the end | live terminal you read and type into |
| Persistence | vanish with the conversation | pads and todos outlive every session |
| Lifetime | die with the parent | keep running when the lead detaches |
| Scope | one session | several sessions, terminals, humans |
Hive workers can still use subagents. See Why not subagents? for the longer answer.
Running several projects
If you keep more than one project registered, hive queen starts a single lead that reads all of them. hive portfolio sorts them into waiting on you, stuck, moving and quiet, and hive next attaches you to the lead that needs you most. The queen writes into another project only through that project's lead, and hive records each write. The queen guide covers setup and limits.
Status
hive is a personal daily-driver tool, released low-key. It is single-user by design and dogfooded daily by its author on macOS. The test suite also runs on Linux in CI, but nobody drives hive there yet. Issues are welcome; for bigger changes, open a discussion first. See CONTRIBUTING.md. MIT licensed.
Docs
| Page | What's there |
|---|---|
| Architecture | Seven diagrams: process topology, module layering, spawn sequence, wake lifecycle, worker state, project scoping, store and server identity |