Repository navigation
feat: serve external clients from headless remote hosts - #788
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Keep local preview wiring from this branch and always start external clients, matching main after BytePioneer-AI#788, instead of gating them to the local runtime only.
Managed Remote Hosts currently skip the existing external-client listener, so an authenticated MCP client cannot delegate work without a local Desktop runtime. Start the same listener for local, shared, and managed remote runtimes, preserving token authentication, loopback binding,
CODEXHOST_EXTERNAL_CLIENT_PORT=off, and best-effort handling of occupied ports.Initialize the independent official connection before a headless client's first native
thread/start. Without this, a first delegation using the default model can fail before any model-catalog call has initialized the protocol. Add a regression fixture that rejects requests made before initialization, and document the Remote Host data directory and headless behavior.Validation: TypeScript build and typecheck; 70 focused tests across headless delegation, native projection, MCP, runtime, and local shared Host; ESLint and Prettier on changed files. A stable-version backport was also exercised on a Linux x64 NAS using an actual native Codex delegation, completion event, result read, and private Tailscale HTTPS endpoint.
CI: Linux x64, Linux ARM64, and Windows passed. macOS failed in the unchanged Web relay test
closes a phone stalled after ClientHello at the 10-second TLS deadline(packages/web-server/test/relay-http.test.ts:242, lower-bound timing assertion). Re-running that upstream job requires repository administrator access.Related: #785 provides optional remote-access policies and webhooks; this change reuses the existing external-client service and is independently applicable.