698784ae030f087646046ec8f28a79a96a07244e
Investigation notes, written as they were gathered rather than after the fact. No code changes. Covers how a sidecar comes into existence: PM2 peer, dials in to /api/sidecar/register, reports an ephemeral port, officer proxies to it. Officer spawns nothing — the only startup problem left is ordering, handled by waiting on a capability rather than failing the first request. The finding worth having: `sidecar/claude/` is TWO processes, and they register as different sidecars. `claude/index.ts` is officer-anthropic-proxy and registers capability `proxy`; `claude/user-instance.ts` is officer-agent and registers capability `claude`. So `isConnected()` — defined as "a sidecar with capability proxy exists" — means the Anthropic proxy is up, not the agent, which is not what the name suggests. It has no callers today, so nothing is misreading it yet. Marks what is unverified and what is still open rather than presenting the lot as settled: the bind-read-release race in getFreePort, whether the `PORT ?? 5000` fallback is reachable, what a partial boot looks like, and whether the sidecar-side boilerplate is worth factoring the way create-proxy.ts factored officer's side. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
42 MiB
Languages
TypeScript
90.9%
Shell
4.7%
JavaScript
4.1%
CSS
0.2%
HTML
0.1%