Repository navigation
fix(codex): never scan a WSL history source over 9P from background lanes (E9) - #35677
Merged
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[Medium impact] The PR appears safe to merge; no actionable defects were established. SummaryBackground Codex history work now skips custom sources inside WSL.
Reviews (2) · Last reviewed commit: "fix(codex): one WSL-source predicate for..." · Reviewed by Greptile |
…unt and shared-mirror lanes When codexSessionSourceHome points inside a distro (\\wsl.localhost\…), the per-account lane used it as a history source and the shared-mirror lane scanned it, both through 9P from the Windows side, which boots a stopped distro (E9) and yields links codex resume ignores. Both now leave such a source out; the WSL lane, which runs only at launch, owns those homes. Ordinary custom sources are unchanged.
…e home The host system-default session migration (backfill and index heal) also read resolveHostCodexSessionSourceHome as its sessions root; a \\wsl.localhost source would be scanned over 9P and boot a stopped distro (E9). Such a source now makes the migration ineligible, sharing one check with the mirror lane.
…ackfill prep from it Every lane that reads the host history source now uses one protected predicate, isHostHistorySourceInWsl(): the per-account, shared-mirror and ~/.codex lanes, migration eligibility, backfill invalidation after a managed system-default launch, and preparing a migration pass, which now returns false without marking the backfill pending.
nwparker
force-pushed
the
nwparker/codex-history-skip-wsl-sources
branch
from
October 29, 2026 04:46
52a0972 to
3591099
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 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.
ELI5
You can tell Orca to read your Codex history from a custom folder ("Codex history source"). If that folder is inside a WSL distro (a
\\wsl.localhost\…path), several background tasks on the Windows side scanned it directly. Reading a distro's files from Windows starts the distro if it's stopped. Orca must never do that in the background (E9), and links made across that boundary don't resume in Codex anyway. Those background tasks now leave such a folder alone. The WSL launch path, which only runs when you start Codex in that distro, already handles it properly.What Changed
Every background lane that reads the history source home now uses one shared predicate,
isHostHistorySourceInWsl()(protected, inruntime-home-service-managed-home.ts). It's true whenresolveHostCodexSessionSourceHomeis a\\wslpath. Its users:getSelfContainedSessionBridgeSourceHomes,runtime-home-service-managed-home.ts): a WSL source home is left out of the sources. The managed mirror and sibling accounts still bridge.startSystemCodexSessionBridgeInBackgroundcall inruntime-home-service-launch.ts): starts no bridge when the source home is a WSL path.isHostSystemDefaultSessionMigrationEligible()returns false, so the scheduler never scans the source.invalidateBackfillAfterManagedSystemDefaultLaunchreturns null.prepareHostSystemDefaultSessionMigrationPassreturns false without marking the backfill pending.~/.codexlane from feat(codex): history follows you into ~/.codex on system default, with a per-host opt-out (#24511) #34981 now uses the same predicate instead of its ownparseWslUncPathcheck.Ordinary custom source folders (any non-WSL path) behave exactly as before.
Why
These lanes run in the background: at launch preparation, on a schedule and after account switches. A
\\wsl.localhostread from Windows goes over 9P and boots a stopped distro, which E9 forbids for background work. The distro's own history is bridged by the WSL lane inside the distro, only when Codex launches there. Skipping is safer than trying to "check if running first": the WSL lane already owns those homes, and a check-then-read would still race a stop.\\wslCodex history source on Windows.Linked Issue
N/A. Follow-up to #34981 (e9-reviewer's UNC-source item).
Visual Proof
N/A. Background behavior only.
Testing
runtime-home-history-sharing-opt-out.test.ts:\\wsl.localhost\…source home in its sources;The two lane tests fail without the change.
Suites and checks:
src/main/codex-accounts,src/main/codexandmain-process-account-servicespass.runtime-home-catalog-account-keycases time out under full-suite load on this machine, and also on main. Run alone, they pass both here and on main.pnpm tcandpnpm run typecheck:cipass. So do oxlint, the anti-slop lint, the ast-grep gates,check:process-host-importsandcheck:code-quality:changed.AI Disclosure
Review
Agent history and E9: e9-reviewer and d3-gate-audit.
Agent skill upstream boundary
Notes
Only
\\wslsource paths change. macOS, Linux, SSH hosts and non-WSL Windows sources are unaffected.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)