Repository navigation
fix(native-chat): lazy WSL tier for Claude, Grok and omp lookup by id - #27082
Merged
Merged
Conversation
OrcaWin
force-pushed
the
np/p395-wsl-transcript-tier
branch
from
October 10, 2026 01:42
15bb902 to
ece80af
Compare
Only Codex had a WSL fallback when a transcript is looked up by session id, so Claude running inside WSL with no hook path was searched only on the Windows profile and chat showed "Transcript unavailable". Every id lookup now searches this host's roots first and, only on a miss, each running distro's roots for the same agent, through the shared per-root WSL scan. One layout table names how each agent files a session (claude, codex, grok, omp) for both host and WSL lookups.
OrcaWin
force-pushed
the
np/p395-wsl-transcript-tier
branch
from
October 10, 2026 02:05
ece80af to
95db2ef
Compare
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 11 minutes. View limit details
✨ Finishing Touches
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 |
5 tasks done
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
When Claude runs inside WSL on Windows, Orca's chat view has to find the session's history file inside the Linux distro. If the agent's hook never told Orca where that file is, Orca looked only in the Windows home folder, gave up, and showed "Transcript unavailable". Codex already had a fallback that also looks inside running distros. This gives Claude, Grok and omp the same fallback.
What Changed
Mechanism:
wslCodexSessionsDirsbecomeswslAgentSessionsDirs(agent). It builds each running distro's roots from the shared table added in the previous PR (AGENT_SESSION_HOME_SEGMENTS), so the WSL roots are the same ones Session History lists.findWslCodexSessionPathbecomesfindWslSessionPath(agent, …). It keeps the existing behavior: one shared tree walk per root for concurrent lookups, a refresh after a shared miss, and abort handling.SESSION_FILE_ID_LAYOUTStable says how each agent names a session's file (Claude<id>.jsonl, Codexrollout-…-<id>.jsonl, Grok<group>/<id>/chat_history.jsonl, omp<stamp>_<id>.jsonlwith its subagent-folder prune). Host and WSL lookups both use it.resolveTiered: host roots in order (an earlier root still wins), then the WSL tier on a miss.Unchanged guards: an SSH transcript path returns before any lookup. A WSL hook path, or an attested distro, still refuses an ID fallback. A caller-supplied root override gets no WSL tier, which keeps one account's transcript from resolving to another's.
Why
The fallback already existed and had been tuned for Codex: lazy, running distros only, gated reads so a stalled distro reads as "unavailable", not "missing". Reusing it for every agent is smaller and safer than writing three more. Picking the newest file across roots was rejected: it would break root priority (the config-dir-first rule and account isolation).
Linked Issue
Refs #13789. The unit test reproduces the hook-less path from that report, and this fixes it. The report predates main's WSL hook-path translation, so we will ask the reporter to confirm on a build with this change before closing.
Visual Proof
N/A: no UI change. The chat view now loads a transcript it used to fail to find.
Testing
session-file-resolver-wsl.test.ts, new and failing on the base branch:Guard: when a host Claude root has the session, WSL distros are never listed.
Renamed
wsl-session-path-scan.test.tsandhost-readable-transcript-path.test.tskeep their existing coverage.pnpm test src/main/native-chat: 378 files pass.pnpm tc:node, oxlint andcheck:code-quality:changedpass.Not run on a real Windows/WSL machine.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
orca-ssh-transcript:paths return first).Builds on #27079 (merged).
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)