Problem
Braid needs one operation that attaches a human terminal to the exact Claude Code, Codex, Pi, OpenCode, or other process selected by Runtime.
Runtime currently provides normalized execution, logical session continuity, supervisor snapshots, steering, and cancellation paths. It does not expose terminal input, output bytes, resize, or an exact interactive-session handle.
The sandbox platform already has PTY and authenticated WebSocket terminal transport. CLI Bridge currently starts headless subprocesses and retains logical provider session identifiers. Neither path is exposed as one Runtime-owned attachment interface.
A second CLI process that resumes the same conversation is not attachment and must not be labeled as attachment.
Required behavior
Add an optional Runtime-owned interactive session port over the shared interface contract.
Runtime must:
- bind the handle to the exact admitted execution and AgentProfile receipt;
- expose active-process attachment separately from native logical resume;
- provide ordered output with replay, input, resize, status, detach, and acknowledged close;
- preserve the handle for detachable local or sandbox work;
- expose the same capability for Runtime workers and provider-native children with stable parent identity;
- keep runner-specific materialization inside providers or CLI Bridge;
- return an explicit unavailable reason when the selected execution was not started in an attachable terminal.
For Tangle sandbox, adapt the existing sandbox PTY and terminal WebSocket APIs.
For local subscriptions, consume a CLI Bridge interactive-session contract when available.
Acceptance
- Start a sandbox Claude or Codex execution through Runtime and obtain one stable interactive handle.
- Attach, type a command, resize twice, detach, reconnect, and observe exactly one ordered output history.
- The process continues while detached.
- Braid restart can rediscover an unexpired attachable run.
- Attaching to a selected worker reaches that exact child.
- Cancellation, terminal close, transport loss, and sandbox expiry remain distinct.
- Headless executions return unavailable and are never converted into fake attachments.
- All secrets stay in short-lived provider transport state.
- Conformance tests run against one sandbox PTY provider and one local Bridge provider.
Problem
Braid needs one operation that attaches a human terminal to the exact Claude Code, Codex, Pi, OpenCode, or other process selected by Runtime.
Runtime currently provides normalized execution, logical session continuity, supervisor snapshots, steering, and cancellation paths. It does not expose terminal input, output bytes, resize, or an exact interactive-session handle.
The sandbox platform already has PTY and authenticated WebSocket terminal transport. CLI Bridge currently starts headless subprocesses and retains logical provider session identifiers. Neither path is exposed as one Runtime-owned attachment interface.
A second CLI process that resumes the same conversation is not attachment and must not be labeled as attachment.
Required behavior
Add an optional Runtime-owned interactive session port over the shared interface contract.
Runtime must:
For Tangle sandbox, adapt the existing sandbox PTY and terminal WebSocket APIs.
For local subscriptions, consume a CLI Bridge interactive-session contract when available.
Acceptance