AR-4 — Drop role: "host" and is_host_mode #1199

Closed
opened 2026-05-15 12:39:52 +00:00 by architect · 1 comment
Collaborator

Why

After #1198 lands the chat / spec relay, nothing live reads role === "host". The flag is dead weight: the architect agent is just another containerised type that happens to ship as a singleton with dispatchable: false. Rename + delete; no backward compat (pre-launch).

Goal

  • Architect's role becomes "planner" — describes the actual job (planning + spec writing + /breakdown).
  • is_host_mode derivation in webhook-config.mergeAgent is deleted.
  • Every consumer of is_host_mode / role === "host" gets its branch deleted.
  • Config loader rejects payloads with role: "host" — no migration shim.

Acceptance criteria

  • apps/server/src/shared/config/agents-default-config.ts::architect.role changes from "host" to "planner".
  • AGENT_ROLES_LIST (in apps/web/src/features/agents/sections/routing-section.tsx) drops "host" and adds "planner".
  • The zod schema in agents-config-schema.ts admits "planner", rejects "host".
  • webhook-config.mergeAgent no longer derives is_host_mode. The field is removed from the resolved agent shape.
  • apps/server/src/main.ts — every is_host_mode read deleted. Webhook dispatcher's host-mode skip / branch deleted. Code paths that fall through become uniform.
  • No grep hit for role === "host", host_mode, is_host_mode, isHostMode anywhere in the codebase (CI grep gate).
  • Config loader rejects payloads with role: "host" with a clear error message ("role 'host' is no longer supported — use 'planner'").

Tests

  • Schema test: { role: "planner" } validates; { role: "host" } rejects.
  • Webhook dispatcher unit test: routing for architect no longer goes through a host-mode skip; standard routing rules apply (and dispatchable: false keeps architect out of the worker pool naturally).
  • Existing dispatch tests pass without modification (the host-mode branch was no-op for architect, so deleting it shouldn't move behaviour).

Out of scope

  • The legacy infrastructure deletion (#1200).
  • The dashboard UI changes (#1201 / #1202).

References

  • apps/server/src/shared/config/agents-default-config.ts::architect
  • apps/server/src/shared/config/agents-config-schema.ts
  • apps/server/src/shared/config/webhook-config.ts::mergeAgent
  • apps/server/src/main.ts
  • apps/web/src/features/agents/sections/routing-section.tsx::AGENT_ROLES_LIST

Depends on

#1198 — the last role === "host" consumer must be gone before this lands.

Tracker

#1203

## Why After #1198 lands the chat / spec relay, nothing live reads `role === "host"`. The flag is dead weight: the architect agent is just another containerised type that happens to ship as a singleton with `dispatchable: false`. Rename + delete; no backward compat (pre-launch). ## Goal - Architect's role becomes `"planner"` — describes the actual job (planning + spec writing + `/breakdown`). - `is_host_mode` derivation in `webhook-config.mergeAgent` is deleted. - Every consumer of `is_host_mode` / `role === "host"` gets its branch deleted. - Config loader rejects payloads with `role: "host"` — no migration shim. ## Acceptance criteria - [ ] `apps/server/src/shared/config/agents-default-config.ts::architect.role` changes from `"host"` to `"planner"`. - [ ] `AGENT_ROLES_LIST` (in `apps/web/src/features/agents/sections/routing-section.tsx`) drops `"host"` and adds `"planner"`. - [ ] The zod schema in `agents-config-schema.ts` admits `"planner"`, rejects `"host"`. - [ ] `webhook-config.mergeAgent` no longer derives `is_host_mode`. The field is removed from the resolved agent shape. - [ ] `apps/server/src/main.ts` — every `is_host_mode` read deleted. Webhook dispatcher's host-mode skip / branch deleted. Code paths that fall through become uniform. - [ ] No grep hit for `role === "host"`, `host_mode`, `is_host_mode`, `isHostMode` anywhere in the codebase (CI grep gate). - [ ] Config loader rejects payloads with `role: "host"` with a clear error message ("role 'host' is no longer supported — use 'planner'"). ## Tests - [ ] Schema test: `{ role: "planner" }` validates; `{ role: "host" }` rejects. - [ ] Webhook dispatcher unit test: routing for architect no longer goes through a host-mode skip; standard routing rules apply (and `dispatchable: false` keeps architect out of the worker pool naturally). - [ ] Existing dispatch tests pass without modification (the host-mode branch was no-op for architect, so deleting it shouldn't move behaviour). ## Out of scope - The legacy infrastructure deletion (#1200). - The dashboard UI changes (#1201 / #1202). ## References - `apps/server/src/shared/config/agents-default-config.ts::architect` - `apps/server/src/shared/config/agents-config-schema.ts` - `apps/server/src/shared/config/webhook-config.ts::mergeAgent` - `apps/server/src/main.ts` - `apps/web/src/features/agents/sections/routing-section.tsx::AGENT_ROLES_LIST` ## Depends on #1198 — the last `role === "host"` consumer must be gone before this lands. ## Tracker #1203
Author
Collaborator

🤖 Auto-assigned to code-lead (heuristic: area:agents → code-lead (architecture-touching)). Reply /unassign to reroute.

🤖 Auto-assigned to **code-lead** (heuristic: area:agents → code-lead (architecture-touching)). Reply `/unassign` to reroute.
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#1199
No description provided.