Vertical slice B of cockpit mode. Full design: .scratch/cockpit-mode/prd.md.
Blocked by #67 (Slice A). Not ready-for-agent until #67 closes — relabel then.
Goal (end-to-end value)
From inside the devcontainer, a human can kick off /afk (and /hitl) and walk away: the run is autonomous, doesn't tie up the interactive Claude session, and survives detaching the docker compose exec TTY or exiting the session — while cockpit Claude can report status, tail, and stop it.
Acceptance criteria
Testing (highest, single seam — logic in TypeScript)
Unit-test the pure run-mode resolver in the reduce.test.ts / sandbox-runner.test.ts style: resolves detached under the cockpit marker, foreground otherwise. Keep the launcher/shim/.md thin and logic-free.
Unchanged (do not touch)
Inner-sandbox isolation, path-match mount (ADR-0011), the auto-merge-on-green (ADR-0007) and hitl-merge-gate (ADR-0009) semantics — Slice B changes only how the orchestrator process is launched and monitored in cockpit, not what it does.
Constraints (per repo workflow)
Implement with /tdd per criterion, run shell via /exec, stay scoped to this slice's files, no pushing to main, no new dependencies. Depends on #67.
Vertical slice B of cockpit mode. Full design:
.scratch/cockpit-mode/prd.md.Blocked by #67 (Slice A). Not
ready-for-agentuntil #67 closes — relabel then.Goal (end-to-end value)
From inside the devcontainer, a human can kick off
/afk(and/hitl) and walk away: the run is autonomous, doesn't tie up the interactive Claude session, and survives detaching thedocker compose execTTY or exiting the session — while cockpit Claude can report status, tail, and stop it.Acceptance criteria
AGENTIC_IN_CONTAINER) is set, foreground otherwise. The launcher consumes the resolved mode; it holds no mode logic./afkin cockpit: the orchestrator is started as a background process inside the container, writing to the existing.sandcastle/logs/location, decoupled from the interactive session so it survives TTY detach and session exit./afk, tail its log, and stop it on request./hitlparity:/hitlmirrors the detached + monitored behavior with its human-approval gate (PRs left open; ADR-0009 unchanged)./afk//hitl(foreground, via/exec) are unaffected.Testing (highest, single seam — logic in TypeScript)
Unit-test the pure run-mode resolver in the
reduce.test.ts/sandbox-runner.test.tsstyle: resolves detached under the cockpit marker, foreground otherwise. Keep the launcher/shim/.mdthin and logic-free.Unchanged (do not touch)
Inner-sandbox isolation, path-match mount (ADR-0011), the auto-merge-on-green (ADR-0007) and hitl-merge-gate (ADR-0009) semantics — Slice B changes only how the orchestrator process is launched and monitored in cockpit, not what it does.
Constraints (per repo workflow)
Implement with
/tddper criterion, run shell via/exec, stay scoped to this slice's files, no pushing to main, no new dependencies. Depends on #67.