Skip to content

Preserve Windows sandbox runner launch errors - #49261

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c0f4267232306be4d06e7e8accd60f7b77b8d6f3
Sep 29, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c0f4267232306be4d06e7e8accd60f7b77b8d6f3

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Preserve Windows sandbox runner launch errors

Why

Restoring the error mode with SetErrorMode can overwrite the failure code from CreateProcessWithLogonW, causing RunnerLogonError to report the wrong error.

What changed

Capture GetLastError() immediately after a failed runner launch, before restoring the previous error mode, and use the saved code for RunnerLogonError.

## Why

Restoring the error mode with `SetErrorMode` can overwrite the failure code from `CreateProcessWithLogonW`, causing `RunnerLogonError` to report the wrong error.

## What changed

Capture `GetLastError()` immediately after a failed runner launch, before restoring the previous error mode, and use the saved code for `RunnerLogonError`.

GitOrigin-RevId: c0f4267232306be4d06e7e8accd60f7b77b8d6f3
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c0f4267232306be4d06e7e8accd60f7b77b8d6f3 branch from 0579f7f to f35a0fd Compare September 29, 2026 13:09
@copyberry
copyberry Bot merged commit f35a0fd into main Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c0f4267232306be4d06e7e8accd60f7b77b8d6f3 branch September 29, 2026 13:09
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant