hyperhive/docs/tools
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 33da51382e subagent: make interrupt cancel a goal run, not just its turn
`interrupt` killed the child and trusted that to end the run. It didn't:
the default signal is SIGINT, and `claude --print` handles SIGINT by
writing its terminal `result` event and exiting **zero**. A zero exit is
`TurnEnd::Complete`, so `spawn_and_track`'s killed-turn early return —
the code that was supposed to stop the run — never fired, and the loop
went straight on to spawn the next goal turn. An interrupted run carried
on to completion; the interrupt changed nothing about the outcome.

Measured, not inferred: `claude --print --verbose --output-format
stream-json`, SIGINT'd mid-turn, exits 0 on every run.

So record the reason instead of inferring it. `interrupt` writes
`StopReason::Cancelled` — the same path `goal_reached`/`need_help`
already use — while it still holds the `running` lock, so there is no
instant in which the name has lost its cancel handle but not yet gained
its stop reason. `plan_after_turn` checks stop reasons ahead of the goal,
so the run stops whichever way the child ends up exiting. `force`'s
SIGKILL still produces a `TurnEnd::Killed`, and `status` still prefers
the kill record it already had.

`continue`'s budget reset is untouched: it clears the stop reason and
hands back a fresh allowance, which is what makes a cancel a pause an
operator can undo.

The test spawns the real continuation loop against a fake claude that
exits 0 on SIGINT, interrupts it, and asserts turn two never starts —
it reports `left: 2` without the fix.
2026-09-23 23:14:13 +02:00
..
bash.md docs: clear write-good.Passive hits in docs/tools/bash.md 2026-09-20 14:30:39 +02:00
forge-cli.md hive-forge: ci-rerun --run refuses on a PR-triggered run too 2026-09-21 21:37:22 +02:00
forge.md hive-forge: ci-rerun --run refuses on a PR-triggered run too 2026-09-21 21:37:22 +02:00
hivectl-cli.md docs: retire the agent hierarchy from every page that described it 2026-09-21 22:08:47 +02:00
hivectl.md docs: describe the flat container list, not a dormant tree 2026-09-21 22:56:56 +02:00
matrix.md docs: suppress reviewed write-good.Passive false positives 2026-09-20 16:24:11 +02:00
README.md remove the get_host_journal MCP tool and its capability 2026-09-21 19:31:45 +02:00
scheduling.md remove the get_host_journal MCP tool and its capability 2026-09-21 19:31:45 +02:00
subagent.md subagent: make interrupt cancel a goal run, not just its turn 2026-09-23 23:14:13 +02:00
swarm-logs-cli.md docs: gate write-good.Passive on CI 2026-09-20 16:24:11 +02:00
swarmctl-cli.md docs: clear the vale errors the queue-credential prose introduced 2026-09-21 20:38:55 +02:00

Tools

hivectl is your tool — the operator's own host CLI. Everything else here documents the tool surface your agents get inside their containers (the MCP tools an agent's own claude session can call). You never call these directly, but they're the reference for what an agent can actually do — useful when you're trying to understand or debug agent behavior.

For the operator

  • hivectl — the curated guide: provisioning forge and matrix accounts, gateway htpasswd management, container lifecycle shortcuts, interactive agent shell access.
  • hivectl-cli — the exhaustive, autogenerated flag-by-flag reference, kept in lockstep with the binary by CI.

For the swarm operator

  • swarmctl-cli — the exhaustive, autogenerated flag-by-flag reference for swarmctl, kept in lockstep with the binary by CI the same way hivectl-cli.md is. swarmctl itself runs as root on the swarm-controller host, not through hivectl — see swarmctl/README.md for why. Two verb families today: user (authelia's subject store, edited in place) and agent create (queues the swarm-controller's creation job graph). No curated guide yet; add one here if/when that grows.

What your agents can do

  • bash — background shell execution (mcp__bash__*), available on every agent unconditionally.
  • subagent — spawn nested headless claude sessions (mcp__subagent__{start,continue,status,interrupt}), shipped default-on for every agent today alongside bash (expected to become a real opt-in capability later).
  • forge — the hive-forge Forgejo CLI every agent has for issues, PRs, and comments. Not an MCP tool — a binary agents shell out to instead of ad-hoc curl.
  • forge-cli — the exhaustive, autogenerated flag-by-flag reference for hive-forge, kept in lockstep with the binary by CI the same way hivectl-cli.md is.
  • matrix — the matrix MCP tool surface (mcp__matrix__*) for agents with a matrix account, multiple accounts per agent, and declaring extra MCP servers generally.
  • scheduling — scheduled prompts (operator approval required).