Improve Windows process management edge cases#19211
Merged
iceweasel-oai merged 3 commits intomainfrom Apr 29, 2026
Merged
Conversation
Collaborator
Author
|
@codex review |
Contributor
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
jif-oai
approved these changes
Apr 27, 2026
Collaborator
jif-oai
left a comment
There was a problem hiding this comment.
The startup ownership boundary still feels split: spawn_runner_transport owns the runner process only through pipe connect, but send_spawn_request / read_spawn_ready are still part of startup and can fail or time out after the process handle is closed
094c306 to
8341f86
Compare
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.
Summary
Some improvements to Windows process-management issues from #15578
codex-command-runner.exeWriteFileresults when forwarding stdin in the elevated runner, so input is not silently truncatedLocalSidfor SID ownership and add more explanatory comments around the ownership/concurrency-sensitive code pathsWhy
The original PR fixed a lot of Windows session plumbing, but there were still a few sharp process-lifecycle edges:
WriteFileconsumed the whole bufferValidation
cargo fmt -p codex-windows-sandbox -p codex-utils-ptycargo test -p codex-utils-ptycargo test -p codex-windows-sandbox finish_driver_spawncargo test -p codex-windows-sandbox runner_Ran a local test matrix of unified-exec and shell_tool tests, all passing