Skip to content

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.

  1. Rename AgentEngine (lib/services/host/engines.ts) to Harness, keeping claude | codex for now (pi and cursor join in T-5UT9 and here respectively).
  2. Reconcile P6’s lib/services/host/hosts/{claude,codex,cursor}.ts into harness definitions instead of host definitions: a host stays terminal/orca/cmux (plus tmux from T-5UT9), and the harness is what varies per session.
  3. Add cursor to the Harness enum, since P6 introduced it as a host name.
  4. 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.
  5. Update lib/services/host/tests/hosts.test.ts for the new shape.
AreaNote
solutions/ontological/lib/services/host/engines.tsAgentEngine → 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.tsHost/harness part contracts
solutions/ontological/lib/services/host/index.tspickHost and session-launch wiring
  • 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.ts describe 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}.ts are deleted; terminal.ts/ orca.ts/cmux.ts all run harnessArgv(req.harness, ...) generically via wrapperSession().
  • AC-3: Existing session launch invocations 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.
  • tmux host and pi harness (T-5UT9)
  • Host.send (T-CPJI)
  • live session states and status hooks (T-UU2N)
  • 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 in related: 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.

← Back to Tasks