hyperhive/hive-bash-mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
damocles a54f711cc5 hive-bash-mcp: explain the status when returning it, not up front
Mirrors #4333's split on the sibling hive-subagent-mcp surface (mara's
ruling there, quoted on #4336: "dont explain all the possible states
that can be returned in the tool description. instead explain the
status when returning it").

status_explanation() carries what each TaskStatus means and what to do
about it, appended to every format_task answer. The status tool's
description shrinks to what it's for; a caller only ever sees one
state at a time and now learns what it means without cross-referencing
anything else.
2026-09-13 15:48:28 +02:00
..
src hive-bash-mcp: explain the status when returning it, not up front 2026-09-13 15:48:28 +02:00
Cargo.toml hive-bash-mcp: sweep harness/bash-tasks/ of files older than 30d at startup 2026-09-11 19:25:33 +02:00
README.md docs(#2627): crate READMEs for the harness column (hive-agent, hive-agent-mcp, hive-agent-wake, hive-bash-mcp) 2026-07-23 16:41:05 +02:00

hive-bash-mcp

Per-agent background bash-task runner: a long-running daemon (hive-bash-daemon) plus the thin stdio MCP bridge (hive-bash-mcp) claude spawns each turn to talk to it. This is what backs the bash_run / bash_status tools agents use to kick off long-lived shell commands (builds, test suites, anything that shouldn't block a turn) and check on them later.

When to use it

Look here when changing how background bash tasks are spawned, tracked, or surfaced. The daemon owns all subprocess lifecycle (sh -c spawn, completion monitoring, task state files under harness/bash-tasks/) and pushes task-completion todos onto the harness's in-agent socket so they show up in get_loose_ends. The bridge binary is deliberately dumb: no subprocess management, just a unix-socket round-trip per tool call, so it cold-starts in milliseconds every turn.

Shape

Two bins from one shared lib (src/lib.rs):

  • hive-bash-daemon (src/main.rs) — the long-running daemon. runner.rs is the spawn/monitor loop and pushes todos on task transitions; socket.rs serves the daemon's own unix socket for tool-call requests from the bridge.
  • hive-bash-mcp (src/bin/mcp.rs) — the stdio MCP server claude spawns per turn. Forwards every tool call to the daemon over the socket via protocol.rs's DaemonRequest/DaemonResponse and returns the result.

Supporting modules: paths.rs (daemon socket + agent-socket resolution), stats.rs (the bash_commands favorite-tool stat recorded into turn-stats.sqlite).