Repository navigation
Description
Operating system
Windows 11 with WSL2, Ubuntu-24.04.
Orca version
1.4.180
Summary
Grok CLI is installed, signed in, and working inside WSL, but Orca reports:
Not signed in to Grok CLI
In a terminal, run grok login, then click Refresh usage here.
Clicking Refresh usage does not change the status.
Configuration
Orca is configured to use WSL for local accounts:
localAccountRuntime: wsl
localAccountWslDistro: Ubuntu-24.04
The project and Orca terminals also run inside that WSL distro.
Verified state
Inside WSL:
$ grok models
You are logged in with grok.com.
The Grok session file exists in the WSL home:
/home/<linux-user>/.grok/auth.json
It is accessible from Windows through UNC:
\\wsl.localhost\Ubuntu-24.04\home\<linux-user>\.grok\auth.json
There is no corresponding host-side file:
C:\Users\<windows-user>\.grok\auth.json
Despite the valid WSL session, Orca still reports "Not signed in to Grok CLI".
Reproduction
- Install Grok CLI inside WSL only.
- In Orca, set the local account runtime to WSL and select the distro.
- Run
grok logininside WSL. - Confirm that
grok modelsreports a signed-in session. - Open Settings -> AI Provider Accounts -> Grok.
- Click Refresh usage.
- Observe "Not signed in to Grok CLI".
Actual behavior
When GROK_HOME is not set for the Windows Electron process, Orca resolves the auth location from the Windows host home:
C:\Users\<windows-user>\.grok\auth.json
It does not use localAccountRuntime or localAccountWslDistro.
Expected behavior
When the configured local account runtime is WSL, Orca should resolve the selected distro's home and read:
\\wsl.localhost\<distro>\<linux-home>\.grok\auth.json
Both the Grok account-status handler and usage/rate-limit fetcher should use the same runtime-aware path.
Root cause
In the current implementation, resolveGrokHomeDir() falls back to os.homedir()/.grok when GROK_HOME is unset:
src/main/rate-limits/grok-auth.tssrc/shared/grok-session-paths.ts
Because Orca's Electron main process runs on Windows, this resolves to the Windows user home. The configured WSL account runtime is not considered for Grok auth/status or usage reads.
This makes the UI guidance misleading in this setup: running grok login in an Orca WSL terminal writes the valid session to WSL, while Orca checks an unrelated Windows path.
Suggested implementation
Please apply the same runtime-aware credential resolution pattern used for Kimi in:
- [Bug]: Kimi usage fetcher ignores WSL runtime — reads stale Windows credentials, status stuck on "Run Kimi to refresh" #12370
- fix(rate-limits): resolve Kimi usage credentials from configured WSL runtime #12372
- commit 597c84f
In particular:
- resolve the credential home from
localAccountRuntimeandlocalAccountWslDistro; - map the WSL home to its UNC path on Windows;
- use bounded asynchronous filesystem reads, so an unavailable distro cannot block the Electron main process;
- use one resolved path consistently for Grok status and usage/rate-limit reads.
Related
#12370 explicitly noted that the same runtime-target gap likely affected the Grok fetcher.
Activity
manuaudio commentedon Aug 11, 2026
Confirmed at source, and better than that — every component the fix needs already exists in the tree, in the same directory. There's one real snag, which I'll get to. Verified on
upstream/mainat3713dd7376.Your root cause, exactly
src/shared/grok-session-paths.ts:40-46:and the caller,
src/main/rate-limits/grok-auth.ts:5-8:Called with no arguments, so both parameters take their defaults:
process.env(the Windows Electron process, whereGROK_HOMEis unset) andhomedir()(the Windows profile).C:\Users\<windows-user>\.grok, precisely as you reported.Worth noting the
// Why:covers only theGROK_HOMEbranch — it justifies honouring an explicit override, and says nothing about what the fallback should be. The fallback is where the runtime setting should have entered and simply doesn't.Your "both handlers" expectation maps to exactly two call sites, and both have the same shape:
src/main/rate-limits/grok-auth.ts:7src/main/grok/hook-service.ts:68join(resolveGrokHomeDir(), 'hooks', 'orca-status.json'))getGrokHome/getGrokAuthPathhave no importers outsidegrok-auth.tsitself (:11,:86), so the blast radius is those two files.The parts that already exist
The resolver already accepts the override —
resolveGrokHomeDir(env, homeDir)— so no signature change is needed. And the rest is in-tree:getInitialAccountRateLimitTarget(src/main/rate-limits/initial-account-rate-limit-target.ts:18-42) readssettings.localAccountRuntime === 'wsl'and returns{ runtime: 'wsl', wslDistro }, resolving the distro viaresolveLocalAccountRuntimeTarget. It is already computing the exact factgetGrokHome()needs.getWslHomeAsync(distro)(src/main/wsl.ts:306), already used by AI Vault (cached-session-list.ts:124).src/shared/wsl-paths.ts:31builds\\wsl.localhost\<distro>\<path>.So this reads less like "add WSL support to Grok" and more like connecting three things that are already neighbours.
The snag
getWslHomeAsyncis async (Promise<string | null>), and the Grok path is synchronous end to end —getGrokHome()→getGrokAuthPath()→existsSync/readFileSyncatgrok-auth.ts:86. So the wiring isn't purely mechanical: either that chain becomes async, or the WSL home is resolved once and cached somewhere the sync path can read.That's the design question I'd put to a maintainer rather than guess at, because it decides whether this is a two-line change or a small refactor. It's also the reason I'd expect the fix to look different from the Codex one below.
Same family as #13697
The Codex analogue has the identical shape —
getCodexHomePath()falls back tocodexHomePath ?? process.env.CODEX_HOME ?? join(homedir(), '.codex'). The difference is that Codex's fetcher does have a WSL lane (buildWslCodexCommand, which takes a\\wsl$\…UNC path and runscodexinside the distro) — but only when a caller suppliescodexHomePathexplicitly. Grok has no equivalent caller at all.Two symptoms, one root: a home resolver whose WSL-awareness depends entirely on whoever calls it, in a codebase where the runtime setting is available but not threaded through. Worth fixing them with the same shape if a maintainer picks both up.
(Also related, different mechanism: #13697 is a concurrency defect in the Codex lock rather than a path one — the WSL probe and spawn lanes key differently, so the lock never engages. Mentioning only so nobody merges the two.)
What I did not verify
No Windows/WSL host here, so I haven't reproduced the "Not signed in" state or confirmed that pointing
homeDirat the UNC path makes the read succeed. Your UNC-accessibility check (\\wsl.localhost\Ubuntu-24.04\home\<user>\.grok\auth.jsonreadable from Windows) is the load-bearing evidence that it would, and that's your measurement, not mine.nwparker commentedon Nov 17, 2026
Thanks for reporting this! This looks like it comes from Orca's older WSL integration, which reaches into the distro from Windows through
\\wsl.localhostpaths andwsl.exe. We've since shipped a new WSL bridge, WSL hosts, where Orca's server runs inside the distro itself, so this part of the old path isn't involved.Could you give it a try?
If it still happens there, please let us know here with your Orca version. That helps us a lot.