Fix tmux attach disconnect cleanup for issue #2197#2199
Open
Yeachan-Heo wants to merge 1 commit intodevfrom
Open
Fix tmux attach disconnect cleanup for issue #2197#2199Yeachan-Heo wants to merge 1 commit intodevfrom
Yeachan-Heo wants to merge 1 commit intodevfrom
Conversation
The outside-tmux launch path used one compound tmux invocation and treated any attach failure as a failed launch, which killed valid detached sessions during SSH disconnects. Split detached startup from attach, keep mouse setup non-fatal, and only fall back to direct launch when detached session creation or post-attach session validation actually fails. The regression tests now assert ordered tmux calls, preserve-session behavior on interrupted attach, and direct fallback when detached creation never succeeded. Constraint: Keep issue #2197 scoped to tmux detach/attach/fallback behavior Rejected: Keep one compound tmux call with unconditional cleanup | still conflates launch success with attach interruption Rejected: Preserve sessions without probing tmux state after attach failure | weaker fallback discrimination when the detached session is actually gone Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep detached session creation and attach handling separate unless future tmux semantics are re-verified Tested: npx vitest run src/cli/__tests__/launch.test.ts; npx eslint src/cli/launch.ts src/cli/__tests__/launch.test.ts; npx tsc --noEmit Not-tested: Live SSH disconnect against a real tmux server
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Testing
Closes #2197