stablyai/orca · error · Error
Could not resolve the active WSL distribution for Claude log
Error message
Could not resolve the active WSL distribution for Claude login.
What it means
Thrown by createTemporaryClaudeConfigDir() when the managed auth runtime is 'wsl' but location.wslDistro is null/empty. A WSL login requires a concrete distro to target with `wsl.exe -d <distro>`. A null distro means the caller did not resolve the active WSL distro before requesting a WSL login.
Source
Thrown at src/main/claude-accounts/service.ts:659
throw cleanupError
}
return captured!
}
private createTemporaryClaudeConfigDir(location: ManagedClaudeAuthLocation): {
windowsPath: string
linuxPath: string | null
wslDistro: string | null
} {
if (location.managedAuthRuntime !== 'wsl') {
return {
windowsPath: mkdtempSync(join(tmpdir(), 'orca-claude-login-')),
linuxPath: null,
wslDistro: null
}
}
if (!location.wslDistro) {
throw new Error('Could not resolve the active WSL distribution for Claude login.')
}
const linuxPath = execFileSync(
'wsl.exe',
[
'-d',
location.wslDistro,
'--',
'bash',
'-lc',
'mktemp -d "${TMPDIR:-/tmp}/orca-claude-login.XXXXXX"'
],
{ encoding: 'utf-8', timeout: 5000 }
)
.replaceAll(String.fromCharCode(0), '')
.trim()
if (!linuxPath.startsWith('/')) {
throw new Error('Could not create a temporary WSL Claude login directory.')
}View on GitHub (pinned to 1136503c6a)
Solutions
- Resolve and pass a concrete wslDistro (from wsl.exe -l -q or the WSL distro picker) before initiating a WSL login.
- Ensure account.wslDistro is populated when the account is created and re-read at login time.
- If no WSL distro is available, fall back to host runtime or guide the user to install one.
- Detect WSL availability earlier and disable the WSL login option if no distro exists.
Defensive patterns
Strategy: validation
Validate before calling
if (location.managedAuthRuntime === 'wsl' && !location.wslDistro) {
throw new Error('Resolve the WSL distro before starting a WSL login.')
} Prevention
- Resolve wslDistro via wsl.exe -l -q before offering WSL login.
- Persist account.wslDistro at add time and re-read at login time.
- Disable the WSL login option when no distro is detected.
- Fall back to host runtime if WSL is unavailable.
When it happens
Trigger: Calling runClaudeLoginAndCapture with managedAuthRuntime='wsl' but wslDistro=null. The WSL distro detection (wsl.exe -l -q) returned empty or was not run. Account.wslDistro was not persisted at add time.
Common situations: WSL is installed but no default distro is set. The distro detection ran before WSL was ready. A stale account record lost its wslDistro. The user removed the distro after adding the account.
Related errors
- That Claude account belongs to a different runtime.
- Could not create a temporary WSL Claude login directory.
- Could not resolve the active WSL home directory for Claude l
- Managed WSL Claude auth storage is outside Orca account stor
- Managed Claude auth directory does not exist on disk.
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/81858dcad14c57b0.
Report an issue: GitHub.