fix(cli): allow coder ssh --stdio to exit when parent process dies#21583
Merged
fix(cli): allow coder ssh --stdio to exit when parent process dies#21583
Conversation
mafredri
reviewed
Jan 20, 2026
Member
mafredri
left a comment
There was a problem hiding this comment.
It would be nice to see one integration test as well, perhaps via launching the test binary with a flag/env to simulate processes exiting. This also allows us to test that/if it actually works on different platforms.
Member
Author
Added in 7fe3ab1 |
mafredri
reviewed
Jan 21, 2026
Member
mafredri
left a comment
There was a problem hiding this comment.
Thanks for adding the integration test! A few more comments/observations but should be good to go after that.
mafredri
reviewed
Jan 21, 2026
mafredri
approved these changes
Jan 21, 2026
Member
mafredri
left a comment
There was a problem hiding this comment.
Small flag-naming nit, but otherwise LGTM! ![]()
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Relates to coder/internal#1217
Adds a background goroutine in
--stdiomode to check if the parent PID is still alive and exit if it is no longer present.🤖 Implemented using Mux + Claude Opus 4.5, reviewed and refactored by me.