From f1cfc0042f15cabaf112b5b5777e839fde9b32e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Thu, 13 Aug 2026 03:10:39 +0000 Subject: [PATCH] rename officer-agent to officer-claude-code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The old name said nothing about what the process runs, and it sits directly beside officer-anthropic-proxy — a different process doing a different job — so "the agent" was ambiguous exactly where it mattered. CLAUDE.md already had to spend a paragraph insisting the two are not the same thing. It spawns `claude`; the name says so now. Only two references were functional: the generator's CORE_PROCESSES and the CORE list in catalogue.test.ts. Everything else was prose or comments. Left alone deliberately: `x-officer-agent-token`. It looks like the same string and is not — it is the agent-handoff HTTP header, naming a per-panel bearer token, unrelated to any pm2 process. Renaming it would have changed a wire protocol to tidy a label. Historical docs keep the old name. claude-sidecar-isolation.md and open-threads-after-per-user-claude.md are dated investigations that record the PREVIOUS rename, from officer-claude to officer-agent, and rewriting them would make that history unreadable. CLAUDE.md notes the change instead, where somebody reading those will be looking. Also worth recording, from the owner: merging this with officer-anthropic-proxy into one sidecar was investigated tonight and rejected. They stay separate. Co-Authored-By: Claude Opus 5 (1M context) --- CLAUDE.md | 5 +++-- docs/working-on-officer.md | 4 ++-- scripts/setup/machine-setup/machine-setup.sh | 2 +- scripts/setup/officer-setup/lib/services.sh | 7 ++++++- src/servers/app-store/catalogue.test.ts | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 271d200c..64da028c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -57,14 +57,15 @@ One Bun process (`src/server.tsx`) serves everything: Long-running and privileged work lives in **sidecars**: separate processes that dial back in over `/api/sidecar/register` and are tracked in `src/servers/sidecar-registry.ts`. PM2 runs them -(the generated `ecosystem.config.cjs` — see below): `officer` (the server), `officer-anthropic-proxy`, `officer-agent`, +(the generated `ecosystem.config.cjs` — see below): `officer` (the server), `officer-anthropic-proxy`, `officer-claude-code`, `officer-opencode`, `officer-email`, `officer-pty`, `officer-vnc`, `officer-music`, `officer-vault`, `officer-slskd`, `officer-headscale`, `officer-transmission`, `officer-invoiceshelf`, `officer-wallet`, `officer-photos`, `officer-notify`, `officer-caldav`, `officer-memos`, `officer-jellyfin`, `officer-gitea` — twenty as of 2026-08-06, and a list that goes stale every time a sidecar lands. `pm2 jlist` is the source of truth. -**`officer-anthropic-proxy` and `officer-agent` are not the same thing.** The proxy holds the Anthropic +**`officer-anthropic-proxy` and `officer-claude-code` are not the same thing.** (The second was +called `officer-agent` until 2026-08-13; older docs use that name.) The proxy holds the Anthropic credential and forwards API traffic; the agent is the process that spawns `claude`. They were one entry named `officer-claude` until the sidecar-isolation work — which is exactly how the false claim that "restarting officer doesn't disturb the agent" survived so long. Every sidecar is a PM2 peer of diff --git a/docs/working-on-officer.md b/docs/working-on-officer.md index 4b231a23..b3e42fc7 100644 --- a/docs/working-on-officer.md +++ b/docs/working-on-officer.md @@ -67,13 +67,13 @@ Commit messages: simple lowercase, no prefixes, explaining *why*. ## Running and checking your work -The server runs under pm2 as `officer`, plus sidecars (`officer-anthropic-proxy`, `officer-agent`, +The server runs under pm2 as `officer`, plus sidecars (`officer-anthropic-proxy`, `officer-claude-code`, `officer-opencode`, `officer-email`, `officer-pty`, `officer-vnc`, `officer-music`, `officer-vault`, `officer-slskd`, `officer-headscale`, `officer-transmission`, `officer-invoiceshelf`, `officer-wallet`). `pm2 list` shows them; `pm2 logs officer` follows. Two of those names are worth knowing apart: **`officer-anthropic-proxy` holds the Anthropic credential -and proxies API traffic; `officer-agent` is the process that actually runs `claude`.** +and proxies API traffic; `officer-claude-code` is the process that actually runs `claude`.** **Which process to restart.** A change under `src/servers/sidecar//` needs that sidecar restarted; a change anywhere else needs `officer`. Both, if you changed the wire between them. Restarting `officer` diff --git a/scripts/setup/machine-setup/machine-setup.sh b/scripts/setup/machine-setup/machine-setup.sh index 881ca605..82f79a2a 100755 --- a/scripts/setup/machine-setup/machine-setup.sh +++ b/scripts/setup/machine-setup/machine-setup.sh @@ -2088,7 +2088,7 @@ if ! skip; then echo "" info "Agent CLIs — the programs Officer's chat actually runs" echo " claude $(agent_version claude || echo 'not installed')" - echo " spawned by officer-agent; chat does not work without it." + echo " spawned by officer-claude-code; chat does not work without it." echo " opencode $(agent_version opencode || echo 'not installed')" echo " the alternative agent, run by officer-opencode." echo "" diff --git a/scripts/setup/officer-setup/lib/services.sh b/scripts/setup/officer-setup/lib/services.sh index f5c2ddce..3d0cbd3a 100644 --- a/scripts/setup/officer-setup/lib/services.sh +++ b/scripts/setup/officer-setup/lib/services.sh @@ -33,10 +33,15 @@ ecosystem_file() { echo "$(platform_dir)/ecosystem.config.cjs"; } # # `officer-pty` is node rather than bun, and that is not an oversight: it loads # node-pty, a native module built against Node's ABI. Everything else is bun. +# +# `officer-claude-code` was `officer-agent` until 2026-08-13. The old name said +# nothing about what it runs, and it sits beside officer-anthropic-proxy — which +# is a different process doing a different job — so "the agent" was ambiguous +# exactly where it mattered. It spawns `claude`; the name says so now. CORE_PROCESSES=( "officer|bun|start" "officer-anthropic-proxy|bun|run src/servers/sidecar/claude/index.ts" - "officer-agent|bun|run src/servers/sidecar/claude/user-instance.ts" + "officer-claude-code|bun|run src/servers/sidecar/claude/user-instance.ts" "officer-opencode|bun|run src/servers/sidecar/opencode/index.ts" "officer-pty|node|src/servers/sidecar/pty/index.mjs" "officer-headscale|bun|run src/servers/sidecar/headscale/index.ts" diff --git a/src/servers/app-store/catalogue.test.ts b/src/servers/app-store/catalogue.test.ts index 0db5a2e3..8d5b9aef 100644 --- a/src/servers/app-store/catalogue.test.ts +++ b/src/servers/app-store/catalogue.test.ts @@ -29,7 +29,7 @@ import { CAPABILITIES } from '../capabilities/registry'; const CORE = [ 'officer', 'officer-anthropic-proxy', - 'officer-agent', + 'officer-claude-code', 'officer-opencode', 'officer-pty', 'officer-headscale',