Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dormant-terminal-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sapiom/harness": patch
---

Allow an explicit first Terminal start in a dormant Studio session, preserving its Studio and Assistant identities. Coalesce duplicate starts, revalidate workspace authority, and prevent End races or project bootstrap from starting unintended work.
16 changes: 16 additions & 0 deletions packages/harness/docs/dormant-terminal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Starting Terminal in a dormant session

Recorded Continue allocates a Studio row with `terminalState: "not-started"`.
Its Assistant conversation can be prepared without launching a Terminal process.

`POST /api/sessions/:id/terminal/start` with the boot token and an empty JSON
object explicitly starts the first Terminal in that same Studio session. The
server revalidates workspace/project authority and prepares current credentials.
It runs the normal adapter launch without an initial prompt, parent context, or
automatic project bootstrap. No workspace or launch overrides are accepted.

Concurrent starts share one preparation. End cancels older preparation before
spawn; a failure before spawn keeps the not-started marker. The marker is removed
only when the first PTY is published. Assistant association remains unchanged.
Repeated calls while that allocated Terminal is live return it; after it exits,
use the ordinary Terminal Resume flow. Conflicts return 409, unknown IDs 404.
Loading
Loading