Skip to content

Make WSL first-class for local agents and provider accounts - #2649

Merged
Jinwoo-H merged 1 commit into
mainfrom
fix-wsl-codex-account-detection
May 29, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
fix-wsl-codex-account-detection

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Make WSL a first-class local runtime for Orca on Windows: WSL terminal panes, local agent detection, provider-account views, launches, and rate-limit checks are now runtime-aware instead of PowerShell-only.
  • Add explicit Windows/WSL location controls in Settings > Agents and Settings > AI Provider Accounts so users can inspect Windows and WSL state independently from the default Terminal shell.
  • Keep the WSL distro dropdown below the Windows/WSL segmented control so selecting WSL does not shift the toggle layout.
  • Keep managed Claude and Codex account selections disjoint by runtime: Windows shells use the Windows-selected account, WSL shells use the selected WSL distro account, and each runtime keeps its own System default fallback.
  • Add Claude parity with Codex for WSL-managed account storage, selection, launch preparation, usage/rate-limit target selection, inactive-account usage reads, and status-bar account switching.
  • Pass WSL-managed Claude auth into WSL PTYs via Linux CLAUDE_CONFIG_DIR and WSLENV, without materializing WSL auth into Windows ~/.claude.
  • Preserve and extend WSL Codex account handling for login, launch, rate-limit fetching, cleanup, and host/WSL env isolation.
  • Update provider copy for Claude, Codex, Gemini CLI credentials, and OpenCode Go so each explains how it relates to the selected Windows/WSL account location.

Verification

  • Electron app validation with playwright-cli attached over CDP to a fresh dev instance for this worktree/branch.
    • Confirmed app identity: wsl-improvements @ pr-2649-wsl-codex-account-handling.
    • Verified Settings > AI Provider Accounts shows Windows and WSL Ubuntu independently, with the WSL distro dropdown below the runtime toggle.
    • Verified the Windows view shows [email protected] active while the WSL Ubuntu view shows [email protected] active.
    • Verified the status-bar Claude popover has a Windows/WSL Ubuntu runtime toggle and shows the account for the selected runtime.
    • Verified switching WSL Claude selection changes only the WSL slot and leaves the Windows active account intact.
    • Verified a real WSL-managed test auth directory with .orca-managed-claude-auth marker is accepted by the ownership guard.
    • Spawned a real Orca WSL PTY through the app with a fake claude executable and confirmed it received CLAUDE_CONFIG_DIR=/home/jinwoo/.local/share/orca/claude-accounts/claude-wsl-e2e/auth and WSLENV=...:CLAUDE_CONFIG_DIR.
    • Confirmed the Electron console had 0 errors during the validation.
  • Local checks on the rebased branch:
    • pnpm run typecheck
    • pnpm run lint
    • pnpm exec oxlint --format github
    • git diff --check
    • pnpm exec vitest run --config config/vitest.config.ts src/main/claude-accounts/runtime-selection.test.ts src/main/rate-limits/claude-rate-limit-target.test.ts src/main/codex-accounts/runtime-selection.test.ts src/main/rate-limits/codex-rate-limit-target.test.ts src/main/claude-accounts/service.test.ts src/main/rate-limits/service.test.ts

Proof screenshots

  • Generated locally and intentionally not committed:
    • tmp/electron-claude-parity-fresh/accounts-claude-windows.png
    • tmp/electron-claude-parity-fresh/accounts-claude-wsl-real.png
    • tmp/electron-claude-parity-fresh/claude-status-popover-windows.png
    • tmp/electron-claude-parity-fresh/claude-status-popover-wsl-real.png

Remaining manual coverage

  • I did not complete fresh provider OAuth login flows in the dev profile because those open real provider login flows and modify managed account state.
  • Gemini/AGY and OpenCode Go still require signed-in local/session state before provider execution can be fully verified end-to-end.
  • A broad src/main/claude-accounts/runtime-auth-service.test.ts run still has Windows filesystem fixture failures around symlink/chmod/rename behavior; focused affected tests and service/rate-limit coverage pass.

@Jinwoo-H
Jinwoo-H force-pushed the fix-wsl-codex-account-detection branch 4 times, most recently from 4fc6146 to a9369d0 Compare May 27, 2026 19:33
@Jinwoo-H Jinwoo-H changed the title Fix WSL Codex account handling Make WSL first-class for local agents and provider accounts May 27, 2026
@Jinwoo-H
Jinwoo-H force-pushed the fix-wsl-codex-account-detection branch 15 times, most recently from 040fccc to 2cb7aea Compare May 29, 2026 06:10
@Jinwoo-H
Jinwoo-H force-pushed the fix-wsl-codex-account-detection branch from 2cb7aea to 929e5e5 Compare May 29, 2026 20:58
@Jinwoo-H
Jinwoo-H merged commit 0d060e1 into main May 29, 2026
1 check passed
@Jinwoo-H
Jinwoo-H deleted the fix-wsl-codex-account-detection branch May 29, 2026 23:06
@OrcaWin OrcaWin mentioned this pull request Oct 9, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant