| Filename | Latest commit message | Latest commit date |
|---|---|---|
`continue`, and every later turn of a goal run, passed `--resume <name>`. claude 2.1.287 resolves a title across the project dirs of every git worktree of the repo and refuses when two sessions match, while `start` archives a prior session only in its own cwd's project dir. A name first started under one worktree and then started again under a sibling stayed live in both, and every resume of it failed with `--resume "<name>" matches 2 sessions`. That is the #5000 incident: build-4921a/b were first run under /home/atlas/wt/4901-build, then under their own worktrees. Both resume sites now look up the live session titled `name` in the config's own project dir (the same `SessionStore::find_by_title` lookup `start` archives with) and pass its id. The id comes off disk at each resume, so it survives a daemon restart. When that dir holds no session under the name, the name is passed as before and claude's answer stands. The test drives a fake claude that keeps sessions on disk and resolves titles across project dirs the way claude does. Its script is written by a child process, so no write fd on it exists in the test binary for a concurrent fork to inherit (the ETXTBSY of #4898). |
||
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
hive-subagent-mcp
Per-agent daemon (hive-subagent-daemon) that spawns nested headless
claude sessions on request and serves the tool surface
(start/continue/status/interrupt, plus a separate
subagent-facing goal_reached/need_help route, one per-session URL)
directly over streamable-http. No stdio bridge, no per-turn respawn — an
agent's claude reconnects to the same stable URL every turn.
Independent of hive-bash-mcp — a subagent spawns a full nested
claude session, a much heavier capability than a bash command, worth
its own deployable/restartable unit.
Shape
One bin (hive-subagent-daemon, src/main.rs) built from the crate's
own lib (src/lib.rs):
session.rs— the actual claude-facing logic:Claude::spawn+RunningClaude::wait/cancel_handle(notInfiniteSession::run, which has no cancel handle to reach in — see the module doc for the v1 scope this trades away), the turn-continuation loop agoalswitches on, and the in-memory maps that are the only state this daemon keeps (no task files — a restart stops whatever's running; the actual claude session is the durable store, found again by name viahive_claude::SessionStore).mcp.rs— thermcptool routers (the parent'sstart/continue/status/interrupton/mcp, the subagent'sgoal_reached/need_helpon/signal/mcp/<token>) +serve_http. Neither signal tool takes a session name: the token in the path is minted per run and resolved to a session before dispatch, so a subagent has no way to name — and therefore no way to signal — a sibling. One route with a path parameter, because theRouteris built once at startup and sessions come and go for the daemon's whole life.paths.rs— the in-agent todo-socket path.