Repository navigation
fix(rate-limits): recover WSL Codex usage RPC refresh (#7567) - #7658
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Codex RPC launch path now builds WSL commands through shared login-shell and escaping helpers, with optional RPC stdio isolation enabled for the WSL RPC path. Tests were updated to assert the new WSL command composition more precisely, cover the PTY fallback command shape, and verify that on Windows with a host Codex home path the RPC path spawns 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
|
This looks like the right fix for the Codex usage/rate-limit RPC failure in #7567. One small cross-link to avoid conflating two Codex WSL symptoms: #6907 is still the Codex agent-status/sidebar path, not the usage RPC path. The local #6907 diagnostics suggested Codex sidebar status needs Codex hook events ( Happy to retest both separately once the relevant PRs land. |
Jinwoo-H
left a comment
There was a problem hiding this comment.
Thanks @rodboev — confirmed the WSL usage refresh direction and tested it with a real managed WSL Codex account.
I added follow-up hardening before landing:
- use Orca's configured interactive login shell rather than Bash-only startup
- isolate Codex JSON-RPC streams from shell startup files
- preserve PTY, host, account-home, and bounded-cwd behavior
- expand Windows/WSL regression coverage
Focused tests, typechecking, current-main integration, and cold/repeat Electron refresh validation pass.
Clean auto-merge, no conflicts (109 files, +7490 from main). Brought in: - Codex WSL runtime status hooks (#7969); WSL/SSH agent path resolution past shell aliases (#7867); WSL source-control path separators (#7966); WSL GitLab-auth wake fix (#7967); WSL Codex usage RPC refresh (#7567/#7658) - Improve workspace cleanup list (#7053) + background removal - mobile: per-host connection log + Tailscale wedge recovery (#7984/#7980), wake slept agents on mobile worktree open (#7906) - Harden layout validation, watcher lifecycle, connection robustness (#7924) - Disable experimental worktree card style by default (#7977) Perf-branch structure preserved (clean auto-merge). typecheck 0 errors; lint 0 errors. CI is the release gate (local runs skipped per env lag). Co-authored-by: Orca <[email protected]>
…stablyai#7658) * fix(codex): launch WSL usage RPC through interactive shell (stablyai#7567) * fix(codex): harden WSL usage RPC shell startup --------- Co-authored-by: Jinwoo Hong <[email protected]>
Summary
CODEX_HOME, hidden rate-limit working directory, host env cleanup, Windows no-PTY-fallback policy, and host/non-WSL command paths unchanged.Closes #7567.
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildFocused validation run after rebasing onto current
main:pnpm exec vitest run --config config/vitest.config.ts src/main/rate-limits/codex-fetcher.test.ts- passed, 15 tests.pnpm run typecheck:node- passed.AI Review Report
The diff is scoped to the Windows WSL Codex rate-limit child process launcher and its tests. Cross-platform behavior outside that path is unchanged by construction.
Review points:
buildWslCodexCommand.windowsHideand hidden cwd setup.CODEX_HOMEremains scoped to the WSL child environment and is stripped from the host env in that path.Security Audit
The change adds no IPC surface, storage format, credential format, network endpoint, dependency, or new subprocess type.
Security properties preserved:
CODEX_HOMEis still removed for WSL children.Notes
Thanks to @euclodius for isolating that both the system default WSL Codex home and a separate Orca-managed WSL Codex home can authenticate and return
rateLimitsfrom inside WSL.Live recovery still needs manual-owner-proof on a Windows+WSL profile with shell-initialized Codex.