T-GG0N-split-host-and-harness-back-into-independent-axes-after-p6-s
State: closed/done · Impact: high · Complexity: medium
P6 (#2327) ships claude/codex/cursor
as hosts directly, collapsing two axes simple-dispatch keeps separate: where a
session runs (host: terminal/orca/cmux/tmux) and which agent CLI protocol runs
there (harness: claude/codex/cursor/pi). P6 merges as-is; this task un-collapses
them so any harness can run in any host, per
simple-dispatch-plan.html’s “Hosts live” phase. It
is the first task of Sessions v2.
Approach
Section titled “Approach”- Rename
AgentEngine(lib/services/host/engines.ts) toHarness, keepingclaude | codexfor now (piandcursorjoin inT-5UT9and here respectively). - Reconcile P6’s
lib/services/host/hosts/{claude,codex,cursor}.tsinto harness definitions instead of host definitions: a host stays terminal/orca/cmux (plus tmux fromT-5UT9), and the harness is what varies per session. - Add
cursorto theHarnessenum, since P6 introduced it as a host name. - Update
pickHost/session-launch call sites so a session picks a host AND a harness independently, with a default host-per-harness mapping so existing invocations (e.g.sdlc session launch --host claude) keep working during the transition. - Update
lib/services/host/tests/hosts.test.tsfor the new shape.
| Area | Note |
|---|---|
solutions/ontological/lib/services/host/engines.ts | AgentEngine → Harness, add cursor |
solutions/ontological/lib/services/host/hosts/ | P6’s claude/codex/cursor files become harness-aware, not harness-baked-in |
solutions/ontological/lib/services/host/contract.ts | Host/harness part contracts |
solutions/ontological/lib/services/host/index.ts | pickHost and session-launch wiring |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: A harness (claude/codex/cursor) can open in more than one host (terminal
and orca, at minimum) via the same registry. Verified:
lib/services/host/tests/hosts.test.tsdescribe block “a harness can open in more than one host via the same registry (AC-1)”. - AC-2: No file under
hosts/both opens a terminal AND hard-codes which agent CLI runs in it.hosts/{claude,codex,cursor}.tsare deleted;terminal.ts/orca.ts/cmux.tsall runharnessArgv(req.harness, ...)generically viawrapperSession(). - AC-3: Existing
session launchinvocations from P2/P6 keep working via a default host-per-harness mapping. Verified:lib/services/session/launch.test.ts’s “AC-3: a legacy —host claude invocation … resolves to {host: terminal, engine: claude}” test.
Out of scope
Section titled “Out of scope”- tmux host and pi harness (
T-5UT9) - Host.send (
T-CPJI) - live session states and status hooks (
T-UU2N)
Dependencies
Section titled “Dependencies”- P6 (#2327) merges first — this is the task’s real,
hard blocker, but it targets a PR, not a task entity, so it cannot be expressed in frontmatter’s
depends_on:(entity wikilinks only, per the task schema). Recorded inrelated:instead so a reader still finds it;task next/dependency-graph tooling cannot see this block until P6 either merges or gets its own tracking task.