Keep terminal mounted with an exit banner when a session dies#58
Draft
HaydnG wants to merge 1 commit into
Draft
Conversation
When a pre-launch command (or claude itself) fails fast, the renderer's onProcessExited handler was calling destroySession immediately, which disposes the xterm and removes the DOM element. Any stderr the failing command wrote (claude: command not found, devbox: unknown flag, shell errors, etc.) was destroyed with the terminal, leaving the user with no feedback — a blank terminal opens for a moment and vanishes. Write a styled "── session exited (code N) ──" banner into the terminal and defer the destroy. For Claude sessions the terminal stays mounted so the user can scroll back and read whatever was printed before the exit; re-clicking the session destroys + relaunches via the existing closed- entry branch in openSession. Plain terminal sessions remain ephemeral (destroyed and removed from the sidebar immediately).
JeanBaptisteRenard
referenced
this pull request
in JeanBaptisteRenard/switchboard
Jun 9, 2026
…exit-banner feat(terminal): keep terminal mounted with exit banner on session death (port upstream #58)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why this matters
This was triggered for me by an org-specific misconfiguration (using `devbox ai --cli` as a pre-launch command, which is actually an installer not a launcher — it exited non-zero and the terminal vanished), but it's a generic UX cliff for any failed launch: misspelled `preLaunchCmd`, missing `aws-vault` profile, etc.
Test plan