| Filename | Latest commit message | Latest commit date |
|---|---|---|
done_summary previously only pointed at .out/.err without any visual distinction, so a completed task with clean-looking stdout and a nonzero exit still read as routine bookkeeping in the todo queue. Rather than gating a flag on the exit code, key it on has_stderr - a failed command mid-chain (cd bad-path && rm ...) can exit 0 while the real evidence sits in stderr, so an exit-code trigger would filter out precisely the cases where nothing looks wrong. .err's presence is already the scarce, meaningful signal the Read() pointer is built on; keying the flag on the same condition costs nothing on the common quiet-success path (no stderr, no pointer, unchanged) and fires on every case where something was written to stderr, including the ones the exit code can't be trusted to reveal. When stderr is present: header reads as a flag instead of neutral bookkeeping, and the .err pointer is listed before .out so it's not the last thing skimmed past on a long completion. |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
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.rsis the spawn/monitor loop and pushes todos on task transitions;socket.rsserves 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 viaprotocol.rs'sDaemonRequest/DaemonResponseand 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).