Skip to content

Resume an ended outside session in a terminal (#593) - #602

Merged
barelyworkingcode merged 6 commits into
epic/596-session-adoptionfrom
feat/593-resume-ended
Oct 20, 2026
Merged

barelyworkingcode merged 6 commits into
epic/596-session-adoptionfrom
feat/593-resume-ended

Conversation

@barelyworkingcode

Copy link
Copy Markdown
Owner

Closes #593

PR 2 of 2 for #593 (epic #596); PR 1 was the pin, #601. An ended outside row in a console project shows Resume. A tap opens a claude-code terminal in the row's folder with --resume <conversation>, through relay's existing POST /api/terminals door (no scope, no new route, frame or grant).

  • chief-of-staff-outside.js: claudeSessionId from relay's ended rows goes into a private map, replaced with each accepted snapshot. The row field whitelist keeps it out of every snapshot, frame, list, detail and tool result. resume(id, {cols, rows}) runs the contract's six checks in order (UUID check before the value becomes a CLI argument), makes one relay call, and logs one line per outcome without the conversation id.
  • POST /api/outside-sessions/:id/resume (routes/index.js, CRLF kept): the browser sends only the row id and size.
  • public/agent-board.js: showsResume, resumeReason, shared resuming/resumed state; Resume / Resuming… / Resumed, and a one-line reason for a row in no project or on a host. Live rows never show it.
  • Docs: FEATURES G6.106 (r1 no project, r2 host, r3 relay refuses), G6.104 clause, docs/api.md, docs/design-chief-of-staff.md.
  • Journey outside-thread: the only button beside the ended row is Resume; Resume opens a terminal that shows the ended conversation's marker; timeout 600000 → 720000 (contract limit).

Harness note. On the base, the outside-thread check "no button beside the ended row" used a has locator rooted at the group, which matches nothing inside a wrap, so it could never fail. Main's harness passed against this head for that reason. This PR makes the locator relative and FAILs with the collected problems before the click.

Decisions (logged in the run report): read-only projects resume under their own rules (question 2); the id comes from relay#535's ended rows and stays on eve's server (question 1).

Minor, not fixed: the journey answers Claude's folder-trust prompt when /trust/i appears anywhere in the buffer, so history holding the word costs one empty Enter. g6-cos-outside-ended.spec.js:119's title "has no action" is stale (outside this ownership). Theoretical: Resumed is per page, so a reload or a second device shows Resume again while the resumed terminal runs (contract question 5).

Full suite on a06e092: 841 passed.

Fix attempts: 1 (journey locator). Review rounds: 1. Tokens: about 0.9M (subagents about 0.8M).

Review: no blocking (default model; one should-fix and three minors fixed)
Journey: outside-thread PASS on stack e593 (relay 121e6b8 + this head af0a410; later commits touch no journey code)
Harness weakening: none; the no-button check is replaced by a stricter only-Resume check, and the timeout grows within the contract
Main harness vs head: base harness outside-thread PASS against af0a410 (its no-button check could not fail; see Harness note)
Break-and-restore: dropped the host rule from showsResume; G6.106.r2 went red; restored byte for byte (cmp)

🤖 Generated with Claude Code

barelyworkingcode and others added 6 commits October 20, 2026 10:16
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…n the browser (#593)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… into a timeout (#593)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…order (#593)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gs through the Chief of Staff logger (#593)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@barelyworkingcode
barelyworkingcode merged commit c11387e into epic/596-session-adoption Oct 20, 2026
@barelyworkingcode

Copy link
Copy Markdown
Owner Author

merge-check: merged. approved, target, contract, evidence, owner
Report: 2. The gates themselves: journey timeout loosened outside-thread 600000 -> 720000 ms (test/static/frozen.json)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant