fleet: Claude Code resident runtime (web lead on Claude), ios served, resident workspaces, HQ self-heal #162
No reviewers
Labels
No labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
key-store/key.store!162
Loading…
Reference in a new issue
No description provided.
Delete branch "fleet/claude-runtime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Founder ask (2026-08-19): migrate the work to resident codexes + claudes — web engineer on Claude, the rest on Codex — all running and responsive on Zulip, ready to take delegated work and put up first PRs; goal: a self-sustaining agent ecology.
What this PR does
Claude Code resident runtime (dispatch pin
d044fca5, dispatch PR key-store/dispatch#3): the supervisor gains a second runtime. Roles whose orgagent.runtimeresolves toclauderun Claude Code headless (claude -p --input-format stream-json --output-format stream-json): one long-lived process per identity thread bound to a stable--session-id(resumed after a crash),--append-system-promptfor the identity instructions,--effortfrom the role, the forge control-plane MCP hub via--mcp-config(bearer expanded from the task env — verifiedforge_control_plane=connected,zulip_current_user→web@key.store),acceptEdits+ explicit tool allow list (bypassPermissions is refused as root). Steers written mid-turn are injected into the running turn (verified on 2.1.148: oneresultper turn) so steer/turn bookkeeping is unchanged; crash/overload turns are requeued. Zulip steers can be pinned to an identity by the invoked bot'sbot_email.org/organization.toml:agent_runtime.default_runtime = "codex", tierclaude-high(claude-opus-5 / high),tech_lead_web→claude-high. Tier/default models only apply to roles of the same runtime (a claude role never inherits a gpt id).nixos/modules/services/agent-dispatcher:services."key.store".agentDispatcher.claude.{path,configDir,anthropicApiKeyFile,steering}→ supervisor flags/env, per-identityCLAUDE_CONFIG_DIRroot, ReadWrite/ReadOnly paths; supervisorRestart=always.pkgs.claude-code(unfree predicate),agentDispatcher.claudewired, OpenBao entryanthropicApiKey = runtime "anthropic/api-key"materialised for the supervisor (the .age file is not read);iosis no longer excluded from the forge supervisor (it had no host at all).key-store-resident-workspaces, oneshot before the supervisor): each identity thread's cwd becomes a git checkout of key.store,user.name/email= the identity, a credential helper that reads the identity's Forgejo token file at push time, and an SSH signing key minted on the forge (published under/var/lib/key-store/resident-signers/allowed_signers, not auto-trusted — see decision 1).Requires=the forge Postgres tunnel (a tunnel restart took them down and left them dead 2026-08-17 → the assistant was silent for two days; I restarted it by hand today);Restart=always+ the tunnelUpholds=them.docs/agents/resident-runtimes.md: runtimes, placement, how to delegate from Zulip, health checks.Verified:
nix evalof forge + HQ toplevels; full forge closure builds on the forge (nixos-system-keystore-forge-26.05.20260819.…); dispatchgo test ./... -racegreen.Founder decisions needed (blocked for me by the permission classifier — all security-relevant, rightly)
cat /var/lib/key-store/resident-signers/allowed_signers→ paste the pubkeys intocontributors.nix+make contributors(canonical KSE-0001), or haveforgejo-ssh-signingappend that file to/var/lib/forgejo/.git_allowed_signers. Alternative: pointuser.signingkeyin the workspaces at/root/.ssh/forge-ed25519(already trusted; commits still authored as the identity).web@key.store… (all identity accounts except founder) to outgoing-webhook bots pointed athttps://dispatch.key.store/webhook/zulip(same shape as the existingagent-dispatcher-bot,bot_type=3+zerver_servicerow with the dispatcher token, thenscripts/setup/flush-memcached) so@**Web** …and DMs route directly. Until then:@**Agent Dispatcher** @web ….main(founder, forge, runner, release-runner) so residents can only land work through reviewed PRs./root/switch.sh).🤖 Generated with Claude Code
- dispatch pin d044fca5: the supervisor grows a second resident runtime. Roles whose org agent.runtime resolves to "claude" run Claude Code headless (stream-json, one long-lived process per identity thread with a stable session id, --append-system-prompt instructions, --effort from the role, the control-plane MCP hub via --mcp-config, acceptEdits + explicit tool allow list, mid-turn steers injected into the running turn). Zulip steers can be pinned to an identity by the invoked bot's email. - org/organization.toml: agent_runtime.default_runtime = "codex"; new tier claude-high (claude-opus-5 / high); tech_lead_web moves to it (founder: "web engineer claude-based, the rest codex"). - nixos/modules/services/agent-dispatcher: services."key.store".agentDispatcher .claude.{path,configDir,anthropicApiKeyFile,steering} -> supervisor flags/env, tmpfiles + ReadWritePaths for the per-identity CLAUDE_CONFIG_DIR root, the key file on ReadOnlyPaths; supervisor Restart=always. - forge: pkgs.claude-code (unfree predicate), agentDispatcher.claude wired, OpenBao entry anthropicApiKey = age/anthropic/api-key materialised for the supervisor (no age file read); ios no longer excluded from the forge supervisor (it had no host at all). - HQ: the dispatcher API/supervisor no longer Requires= the forge Postgres tunnel (a tunnel restart used to take them down and leave them dead — 2026-08-17); Restart=always + the tunnel Upholds= them. - docs/agents/resident-runtimes.md: runtimes, placement, how to delegate from Zulip, health checks.a8a8821dbc1d3d46e985founder referenced this pull request2026-08-22 04:18:41 +00:00