diff --git a/packages/cli/src/shared/orchestrate.ts b/packages/cli/src/shared/orchestrate.ts index 7cbde6046..5252840ff 100644 --- a/packages/cli/src/shared/orchestrate.ts +++ b/packages/cli/src/shared/orchestrate.ts @@ -1012,6 +1012,13 @@ async function postInstall( } exitCode = await cloud.interactiveSession(sessionCmd); + // SIGINT — exit immediately. The user is mashing Ctrl+C to get out; + // any post-session work (reconnect logic, history pull, tunnel teardown) + // just adds delay that forces yet another Ctrl+C. + if (exitCode === 130) { + process.exit(130); + } + if (!isConnectionDrop(exitCode)) { break; } diff --git a/packages/cli/src/shared/ssh.ts b/packages/cli/src/shared/ssh.ts index c3f9dee63..945aba794 100644 --- a/packages/cli/src/shared/ssh.ts +++ b/packages/cli/src/shared/ssh.ts @@ -146,6 +146,15 @@ export function spawnInteractive(args: string[], env?: Record