Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-subagent-mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas f189724a4c hive-runtime, hive-agent: model/effort picker for ACP agents from configOptions
An ACP agent's model and effort pickers now list what its session offers
(its `model` and `thought_level` config options) instead of the claude
model list and EFFORT_LEVELS. A pick goes through the same Bus::set_model /
Bus::set_effort -> Config.model / Config.effort path as on claude; before
each prompt the ACP runtime sets it with `session/set_config_option`, model
first, and only when the session offers that value. Options are re-read
from the set response and from `config_option_update`, so the effort picker
disappears when the chosen model offers no effort levels, and is hidden
while a newly picked model waits for the next turn.

The session's options reach the web UI through a `Choices` handle from a
new `Runtime::choices`, registered on the bus the way `canceller` is.
/api/model and /api/effort accept only offered values on ACP. The claude
path is unchanged.

Refs #4391
2026-09-30 10:53:53 +02:00
..
src hive-runtime, hive-agent: model/effort picker for ACP agents from configOptions 2026-09-30 10:53:53 +02:00
Cargo.toml hive-subagent-mcp: run an agent's subagents on its runtime 2026-09-30 07:41:12 +02:00
README.md subagent: give each run its own signal URL, and drop the name argument 2026-09-14 22:24:51 +02:00

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 (not InfiniteSession::run, which has no cancel handle to reach in — see the module doc for the v1 scope this trades away), the turn-continuation loop a goal switches 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 via hive_claude::SessionStore).
  • mcp.rs — the rmcp tool routers (the parent's start/continue/status/interrupt on /mcp, the subagent's goal_reached/need_help on /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 the Router is built once at startup and sessions come and go for the daemon's whole life.
  • paths.rs — the in-agent todo-socket path.