hyperhive/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas b08176f089 feat(#2693): let the operator pin the claude-code every agent runs
Agents run whatever `claude-code` the meta flake's `nixpkgs` resolves
to, and that is normally a release channel. This one package moves fast
enough that stable trails unstable by weeks — 26.05 is on 2.1.187 while
unstable carries 2.1.220 — and an agent cannot fix it for itself: it
only ever sees the single nixpkgs hive-c0re injects, so an `agent.nix`
has no other tree to reach for.

New host option `services.hyperhive.c0re.claudeCodePackage` takes the
package directly and rides the existing `hyperhiveDocs` threading path —
serveConfigJson -> HiveEnv -> render_flake — to reach each agent as
`hyperhive.claudeCodePath`. Null (the default) is today's behaviour.

What travels is the store *path*, as a plain string literal, not a flake
input: containers share the host's `/nix/store`, so the build is already
reachable inside them with its whole closure and has nothing to travel.
An input would be worse than useless — a `path:/nix/store/<pkg>` input
is re-copied as a reference-less `-source`, which strips exactly the
closure the binary needs.

The catch is that a path written into a generated flake is text, so
nothing in the container's closure keeps the binary alive. The host does
that instead, and gets it for free: the package is interpolated into
`/etc/hyperhive/serve.json`, `builtins.toJSON` preserves string context,
so the /etc entry references it and the system closure gc-roots it for
as long as that generation is the one the agents were rendered from. An
assertion pins that property, because losing the context is invisible at
eval and at deploy — it would surface only as every agent failing to
spawn `claude` whenever the next gc ran.

Container side wraps the path in a symlink farm rather than putting it
on PATH directly: `systemd.services.<name>.path` and
`environment.systemPackages` both coerce a store-path *string* through
`lib.toDerivation`, i.e. `builtins.storePath`, which pure evaluation
rejects. Interpolating the path into a builder is just text and
evaluates anywhere. `claude-code` drops out of systemPackages when a
pin is set, so there is exactly one claude in the container.

Refs #2693
2026-07-27 13:56:28 +02:00
..
tools fix(hivectl): ask the daemon whether an agent exists 2026-07-27 09:34:43 +02:00
turn-loop feat(#2693): let the operator pin the claude-code every agent runs 2026-07-27 13:56:28 +02:00
web-ui job_queue: retire the now-off-wire step sub-step label 2026-07-26 15:24:35 +02:00
agent-hierarchy.md refactor(hive-agent): split the forge notification poller into its own crate 2026-07-26 21:30:29 +02:00
approvals.md job_queue: grow the rebuild subgraph from DeployApply (#2664) 2026-07-26 02:28:03 +02:00
boundary.md feat(#2641): sudoless hivectl via a hive-admin group on the host socket 2026-07-22 22:50:27 +02:00
ci.md docs(#2415): update docs/ci.md for c0re-owned runner registration 2026-07-16 15:30:34 +02:00
conventions.md docs(#2552): never add #[allow(clippy::...)] — fix lints instead 2026-07-20 19:38:56 +02:00
coordinator.md docs(#2754): document the container weights in coordinator/security/persistence 2026-07-27 11:01:36 +02:00
forge.md refactor(hive-agent): split the forge notification poller into its own crate 2026-07-26 21:30:29 +02:00
gateway.md route gateway htpasswd management through a daemon wire command (#2504) 2026-07-15 23:23:47 +02:00
github.md fix(#1970): bake token path into gh/git wrappers — env var didn't reach claude's bash-tool context 2026-07-11 14:12:25 +02:00
gotchas.md feat(#2693): let the operator pin the claude-code every agent runs 2026-07-27 13:56:28 +02:00
knowledge.md docs(security): ci netns, knowledge .git tmpfs, matrix id/secret split 2026-07-10 19:17:17 +02:00
matrix.md refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
network.md fix(gateway): resync the gateway's resolv.conf when the host's changes 2026-07-26 18:01:34 +02:00
observability.md feat(#2007): export per-agent container cpu/mem/disk via otel 2026-07-15 22:51:31 +02:00
persistence.md docs(#2754): document the container weights in coordinator/security/persistence 2026-07-27 11:01:36 +02:00
security.md docs(#2754): document the container weights in coordinator/security/persistence 2026-07-27 11:01:36 +02:00
setup.md refactor(#2416): remove the non-pr config-change flow (request_apply_commit / applycommit) 2026-07-15 21:03:52 +02:00
swarm.md feat(#1997): add prettier markdown formatter to treefmt 2026-07-02 23:33:11 +02:00
terminal-rendering.md refactor(#2416): remove the non-pr config-change flow (request_apply_commit / applycommit) 2026-07-15 21:03:52 +02:00
turn-loop.md refactor(hive-agent): split the forge notification poller into its own crate 2026-07-26 21:30:29 +02:00
web-ui.md feat: rename matrix-accounts page to credentials, add github PAT tab 2026-07-11 12:40:13 +02:00