You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: detach canonical sandbox sessions with Ctrl-D #3743
As a user attached to a sandbox's canonical main process, I want Ctrl-D to disconnect my session while the process keeps running, so that I can return to my local shell and reconnect later.
Problem Statement
The canonical main-process attachment currently recognizes Ctrl-P followed by Ctrl-Q as a detach sequence. Ctrl-D does not detach, even though it is a familiar way to leave an interactive terminal session.
Impact / Why This Matters
Users must remember the two-key detach sequence when they want to leave a live process running. Ctrl-D can instead reach the remote process and cause an unintended EOF or application action. The existing shortcut works but is easy to confuse with exiting the remote process, which makes reconnectable sessions less predictable.
Proposed Design
While connected to the canonical main process, pressing Ctrl-D closes only the current attachment. The main process remains running, its stdin remains open, and another attachment can acquire input. Ctrl-P followed by Ctrl-Q continues to work. Read-only viewers can also use Ctrl-D to leave without affecting the input owner. Independent sandbox exec sessions retain their current Ctrl-D behavior.
Acceptance Criteria
Ctrl-D detaches a canonical main-process attachment without forwarding Ctrl-D to the process.
The canonical process and stdin remain available for a later attachment.
Ctrl-D closes a read-only viewer without releasing another attachment's input ownership.
Ctrl-P followed by Ctrl-Q continues to detach.
CLI help and published sandbox documentation describe the Ctrl-D shortcut.
Alternatives Considered
Keep only Ctrl-P followed by Ctrl-Q. This avoids a second shortcut but does not provide the familiar single-key way to leave a reconnectable session and leaves Ctrl-D able to affect the remote process unexpectedly.
Activity