You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Desktop reconnect can attach to an online shared Host whose official Codex process still refers to files removed by a Desktop update. The interface can appear ready while a later native tool fails to spawn its missing codex-code-mode-host.exe.
Track the files present when each actual official backend generation is created. Before Desktop admission retains that running generation, check those files and reject stale reuse with a fixed recovery instruction. Existing idle configuration replacement remains available, and active official work is preserved until the user chooses to stop/restart Host. Optional companions absent when a generation starts remain optional.
Carry only the fixed recovery text through the authenticated WebSocket close reason; make abnormal bridge closure return failure and expose that recovery text. Create the per-Desktop AppServerHost only after admission succeeds, so rejected reconnects do not leak client/delegation registrations.
This change does not modify login scheduling, extend the 30-second Host-chain deadline, or claim to resolve every cold-start timeout. It detects missing files, not binary version replacement at the same path.
The new tests were run against the old behavior first: stale retention resolved instead of rejecting; the abnormal transport test timed out; the real Desktop admission test exposed a leaked delegation registration. All pass with the final patch.
ESLint on all changed TypeScript files, the repository dependency-boundary checker, Prettier, and git diff --check passed.
Tests use real temporary runtime files and an authenticated loopback Desktop transport with synthetic native backends. They cover active-work preservation, idle A-to-B replacement, current-generation tracking, optional companions, nonzero failure/recovery text, and rejected-session cleanup.
No live Desktop/Store update or OS reboot was performed with this source patch. macOS/Linux execution is left to CI. The original Windows incident was recovered with the existing release through an explicit Host restart, separately from this patch.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
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
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
A Desktop reconnect can attach to an online shared Host whose official Codex process still refers to files removed by a Desktop update. The interface can appear ready while a later native tool fails to spawn its missing
codex-code-mode-host.exe.Track the files present when each actual official backend generation is created. Before Desktop admission retains that running generation, check those files and reject stale reuse with a fixed recovery instruction. Existing idle configuration replacement remains available, and active official work is preserved until the user chooses to stop/restart Host. Optional companions absent when a generation starts remain optional.
Carry only the fixed recovery text through the authenticated WebSocket close reason; make abnormal bridge closure return failure and expose that recovery text. Create the per-Desktop AppServerHost only after admission succeeds, so rejected reconnects do not leak client/delegation registrations.
This change does not modify login scheduling, extend the 30-second Host-chain deadline, or claim to resolve every cold-start timeout. It detects missing files, not binary version replacement at the same path.
Related issues
Fixes #812
Test plan
npm run build:typescriptandnpm run typecheckpassed.native-account-host.test.ts,local-shared-host.test.ts,remote-app-server.test.ts: 32 passed, 10 platform-specific tests skipped on Windows.git diff --checkpassed.