AR-3 — Relay /architect/chat and /architect/spec to docker exec #1198

Closed
opened 2026-05-15 12:39:25 +00:00 by architect · 0 comments
Collaborator

Why

Architect already runs in a persistent Docker container (claude-hooks-architect-default) per specs/architect-dockerize.md. The chat / spec endpoints are the last consumer of the in-process SDK path — and they're the only reason role: "host" still exists in the config.

Land the relay so the in-process path can die. This is the prerequisite for #1199 / #1200.

Goal

  • POST /architect/chat and POST /architect/spec route via docker exec into claude-hooks-architect-default — the same shim every other agent dispatch uses.
  • The in-process SDK code path is deleted, not flagged. No feature toggle.
  • After this story, nothing live reads role === "host".

Acceptance criteria

  • /architect/chat is rewired to docker exec into claude-hooks-architect-default. The handler's request shape (input schema, SSE stream shape) is preserved.
  • /architect/spec is rewired the same way.
  • The in-process SDK code path that today serves these endpoints is deleted entirely — no if (host_mode) branch left behind.
  • Reconcile contract is unchanged: reconcileOne("architect-default") still works exactly like every other agent (per dockerize spec).
  • No role === "host" read remains in any chat / spec handler.

Tests

  • Integration: a POST /architect/chat request reaches the architect container via docker exec and the SSE stream returns the same shape as the previous in-process path.
  • Integration: same for /architect/spec.
  • Regression: agents/health reports the architect container as healthy after the relay swap.

Out of scope

  • Renaming role: "host""planner" (#1199).
  • Deleting HOST_MODE_TYPES / HostContainerLifecycle / getArchitectWorker host filter (#1200).

References

  • specs/architect-dockerize.md — provisioning half; this is the relay half.
  • apps/server/src/domain/architect/* (or wherever /architect/chat is wired today).

Tracker

#1203

## Why Architect already runs in a persistent Docker container (`claude-hooks-architect-default`) per `specs/architect-dockerize.md`. The chat / spec endpoints are the last consumer of the in-process SDK path — and they're the only reason `role: "host"` still exists in the config. Land the relay so the in-process path can die. This is the prerequisite for #1199 / #1200. ## Goal - `POST /architect/chat` and `POST /architect/spec` route via `docker exec` into `claude-hooks-architect-default` — the same shim every other agent dispatch uses. - The in-process SDK code path is deleted, not flagged. No feature toggle. - After this story, nothing live reads `role === "host"`. ## Acceptance criteria - [ ] `/architect/chat` is rewired to `docker exec` into `claude-hooks-architect-default`. The handler's request shape (input schema, SSE stream shape) is preserved. - [ ] `/architect/spec` is rewired the same way. - [ ] The in-process SDK code path that today serves these endpoints is deleted entirely — no `if (host_mode)` branch left behind. - [ ] Reconcile contract is unchanged: `reconcileOne("architect-default")` still works exactly like every other agent (per dockerize spec). - [ ] No `role === "host"` read remains in any chat / spec handler. ## Tests - [ ] Integration: a `POST /architect/chat` request reaches the architect container via `docker exec` and the SSE stream returns the same shape as the previous in-process path. - [ ] Integration: same for `/architect/spec`. - [ ] Regression: `agents/health` reports the architect container as healthy after the relay swap. ## Out of scope - Renaming `role: "host"` → `"planner"` (#1199). - Deleting `HOST_MODE_TYPES` / `HostContainerLifecycle` / `getArchitectWorker` host filter (#1200). ## References - `specs/architect-dockerize.md` — provisioning half; this is the relay half. - `apps/server/src/domain/architect/*` (or wherever `/architect/chat` is wired today). ## Tracker #1203
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
charles/agent-hooks#1198
No description provided.