Repository navigation
Finish remote exec cleanup when output streams remain open - #53331
Merged
copyberry[bot] merged 1 commit intoOct 12, 2026
Conversation
## Why A remote process can exit while its output stream remains open, leaving the exit watcher waiting and delaying `ExecCommandEnd` even after output collection finishes. ## What changed Cancel the process output token after final collection or polling, on one-shot cancellation, and after confirmed termination. This releases the exit watcher while allowing delayed output to be collected before the final poll completes. ## Testing Add remote process event tests for output streams that remain open at the collection deadline, during interruption, and during explicit termination. Assert that `ExecCommandEnd` preserves the exit code and aggregated output, background terminals are cleared, and interruption and termination require no extra `process/read` requests. GitOrigin-RevId: 8346e5ce446280915b6e2ffa362fcfd79280bfff
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/8346e5ce446280915b6e2ffa362fcfd79280bfff
branch
from
October 12, 2026 09:29
f609328 to
7e9c061
Compare
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/8346e5ce446280915b6e2ffa362fcfd79280bfff
branch
October 12, 2026 09:29
This branch was successfully deployed
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.
Finish remote exec cleanup when output streams remain open
Why
A remote process can exit while its output stream remains open, leaving the exit watcher waiting and delaying
ExecCommandEndeven after output collection finishes.What changed
Cancel the process output token after final collection or polling, on one-shot cancellation, and after confirmed termination. This releases the exit watcher while allowing delayed output to be collected before the final poll completes.
Testing
Add remote process event tests for output streams that remain open at the collection deadline, during interruption, and during explicit termination. Assert that
ExecCommandEndpreserves the exit code and aggregated output, background terminals are cleared, and interruption and termination require no extraprocess/readrequests.