hivehouse
hivehouse.dev
A Claude Code plugin that runs a software task with a team of Claude sessions in tmux: an orchestrator, the agents the task needs, reviews and gates before anything lands, context rotation, unattended overnight runs, and cleanup afterwards. A hub session in your work folder hands each task to its project's orchestrator and carries your words both ways.
https://github.com/user-attachments/assets/4d7cd596-8090-4e91-b258-3f470838e277
Skills are instructions; every mechanical action is a tested bash executable in bin/.
Ask Claude to customise anything: roles, rules, skills' behaviour, options. The one exception is loosening delegate (away) mode, which takes one sudo paste from you. See Customise hivehouse.
Delegate mode
The default is relay mode: every start, wake and answer waits for you. Delegate mode is the mode the hub runs while you are away: it decides internal work inside your projects and keeps the teams running, and it keeps pushes, deploys and spending for you. It is on only while a file only you can write says so, for at most 7 days. Details, and what it guards and does not, are in Delegate mode (away); what you can allow it to do is in Customising what away mode allows.
What hivehouse runs and sends
hivehouse is bash scripts and a few hooks. One of them, hooks/hub.tsx, draws the hub's screen. Its hub_auto_start option is on by default: a plain claude started in the hub's folder then renames its session to hub and opens the hub, which takes one model turn. Apart from the push and the ssh below, it makes no network calls of its own, and it sends nothing to us. (The Claude sessions it starts talk to Anthropic like any Claude Code session.)
The hooks. hooks/hooks.json wires four command hooks, each a bash script in bin/ that reads the event on its standard input. None of them makes a network call itself; the away hook decides which network reads and which ssh a session may make.
hh-session-hook, on SessionStart (startup, clear and resume). In a session started in the hub's folder it prints one line that tells Claude it is the hub and should open the hub skill (or, if another hub session is already alive there, that this one is not the hub). In a pane hivehouse registered (an agent it started, or an orchestrator registered with hh-spawn --self) it records the session id and transcript path in that agent's .hivehouse/team/<agent>/session.json, so the Stop hook and the context reading know which session is whose, and it prints a low-disk warning if the free space is below min_free_gb. Anywhere else it does nothing and exits 0.
hh-guard-env, on SessionStart (every start, clear and resume). Appends one line to Claude Code's CLAUDE_ENV_FILE that puts the plugin's bin/guard first in PATH, so rm, find and rsync called by name in a Bash command refuse to delete protected folders. It adds the line once, and touches nothing else. See docs/rm-guard.md.
hh-stop-hook, on Stop. In a session hivehouse registered, or in the hub (proven from hub.json: the recorded process, pane and tmux server), inside tmux, it reads how full the context is (from the session's own transcript, through bin/hh-context, or for the hub the reading hh-hub context prints). At or above the rotate_at_percent option it blocks the stop once for each crossing, with a reason that tells the session to update its handoff file and rotate (the hub: to run hh-hub rotate). When the window size is only guessed, it blocks once instead, to say so and how to set it. Anywhere else it does nothing.
hh-away-hook, on PreToolUse for Bash, MCP tools, SendMessage, Edit, Write, MultiEdit, NotebookEdit, Artifact tools, RemoteTrigger, Agent, Workflow, WebFetch, DesignSync and PushNotification. It does nothing unless the session was launched by the hub in delegate mode with the away marker in its launch environment. With the marker, it denies pushes, publishing and uploads, MCP servers you did not allow, messages to sessions outside the team other than peers you listed with --peers, and changes to Claude Code's settings and hooks. It lets through network reads (curl and wget GET, read-only gh), read-only ssh to the hosts you listed with --remote-allow, messages to listed peers (sent by the hub or a project's orchestrator, each logged in .hivehouse-hub/peers.jsonl), and the extra tools you chose with --tools or --chrome. It reads the tool call, the session's launch environment, the root-owned delegate file, the hub's and teams' records, Claude Code's session records, the process table, and the text of any script a Bash command runs. It answers within 20 seconds and treats anything it cannot read as a denial.
Then everything else it does outside its own files: