Exit cleanly after Linux bootstrap failure#1047
Open
jheinem1 wants to merge 1 commit into
Open
Conversation
Co-Authored-By: Codex <codex@openai.com>
jheinem1
marked this pull request as ready for review
July 17, 2026 05:05
ilysenko
requested changes
Jul 17, 2026
ilysenko
left a comment
Owner
There was a problem hiding this comment.
Thanks for tackling this recovery failure. One blocker remains: the file-level patch targets .vite/build/bootstrap.js, but the current DMG uses a hashed .vite/build/bootstrap-*.js bundle loaded by early-bootstrap.js. The wrapper therefore returns changed: false, and the descriptor is incorrectly reported as already-applied, so the green upstream check is a false positive and the runtime fix is absent. Please resolve the current hashed bootstrap target, remove the obsolete adjacent fixed-path handling per the current-DMG-only policy, fail required status for missing or ambiguous targets, and add a production-layout integration test covering file mutation and patch-report status.
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
Root cause
When
runMainAppStartup()fails after the Linux warm-start socket has been created, upstream bootstrap handling destroys everyBrowserWindowand waits indefinitely for the native failure dialog. If that dialog is hidden or never resolves, the windowless process retains both the single-instance lock and launch-action socket. Every later launcher invocation receives a successful warm-start acknowledgement from an instance that can no longer create a UI.This was reproduced after an expired OAuth refresh token delayed
codex app-serverinitialization beyond Desktop's 30-second bootstrap timeout. The late app-server response could not recover the already-failed Desktop bootstrap, and all later clicks were handed off to the windowless process.Behavior
On Linux, the failure dialog remains available for up to 15 seconds. The app then calls
app.exit(1), which releases the single-instance lock and removes the warm-start socket through normal process teardown. macOS and Windows keep the upstream dialog behavior unchanged.Validation
node --checkon the implementation and descriptorbash -n launcher/start.sh.templategit diff --checkbootstrap.js: changed, idempotent, syntax-valid, and contained the bounded exit