Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between fb4c202531ffbd221a9137b835a7a4e9a437bb1a and e7bd606. 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Codex CLI argument module now exports shared plugin-disabled arguments and rate-limit app-server arguments. The rate-limit fetcher uses these arguments for RPC probes and PTY launches on WSL, Windows, and other platforms. Related process-contract and fetcher tests now expect the updated arguments. Priority: ➖ Normal 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Disable Codex plugins in read-only app-server probes — adds
-c features.plugins=falsetoCODEX_READ_ONLY_APP_SERVER_ARGS, so the rate-limit RPC probe and the state-DB backfill recovery no longer start Codex's plugin marketplace path. - PTY fallback parity —
resolvePtyCommandappends the same override on the native,cmd.exe/win32, and WSL branches, so all four platforms match the RPC probe. - Test updates — the process-contract stub now requires the exact new argv, the WSL PTY fallback asserts the flag, and the state-DB recovery expected-args list was updated.
I verified the mechanism against upstream openai/codex: features.plugins is a documented key, PluginsConfigInput.plugins_enabled derives from features.enabled(Feature::Plugins), and both maybe_start_curated_repo_sync_for_config and maybe_start_plugin_startup_tasks_for_config are gated on it — so the flag does suppress the plugins-clone-* Git clone. FeaturesToml deserializes unknown feature keys into a flattened map and only warns, so this is safe on older Codex builds that predate the key.
ℹ️ Other short-lived codex app-server spawns still start with plugins enabled
The rate-limit probe is the reported and highest-frequency trigger, so scoping the fix here addresses the dominant cause of #7725. Two other short-lived spawns still launch codex app-server with plugins enabled, though, so they can also kick off the curated-repo clone this PR is suppressing.
Technical details
# Other short-lived app-server spawns not covered
## Affected sites
- `src/main/codex/codex-session-index-heal.ts:267` — `getSpawnArgsForWindows(command, ['app-server'])` against the system `~/.codex` home.
- `src/main/codex/codex-trust-grant-host.ts:76` — `getSpawnArgsForWindows(command, ['app-server'])` against the managed home (unless `useDefaultCodexHome`).
## Required outcome
- Confirm whether these probes should also pass `CODEX_DISABLE_PLUGINS_ARGS`, or record why plugins must stay enabled there. The trust-grant session reads `hooks/list`, which can include plugin-provided hooks, so disabling plugins could change its verification — this may be the reason for the current scope.
## Open questions for the human
- Is the fix intentionally limited to the read-only probes, with the heal/trust-grant probes left to upstream cleanup?ℹ️ Nitpicks
- The native and win32 PTY-fallback branches in
resolvePtyCommandgained the new args but have no direct argument assertion; only the WSL PTY branch checks the flag (and loosely, viatoContain). The primary RPC path is well pinned by the process-contract stub, so this is optional.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
fb4c202 to
e7bd606
Compare

ELI5
Orca asks Codex for usage limits by starting a short-lived background server. Codex was also starting marketplace updates in that server, so a Git clone could keep running after Orca finished the usage check and leave a large temporary directory behind. The usage check now tells Codex to skip plugins and marketplace startup.
What Changed
Only the rate-limit RPC and PTY probe arguments include
-c features.plugins=false; the normal read-only app-server arguments used by state-database recovery are unchanged. The probe override applies on macOS, Linux, Windows, and WSL.Before, the rate-limit probe started Codex with the user's managed
CODEX_HOME, which allowed marketplace synchronization and Git clones to begin. After, the probe still readsaccount/rateLimits/readbut does not initialize the plugin marketplace path.Why
Issue #7725 is real: reports include 4.3 GB on Windows 1.4.126, 27 GB and 16 GB on Windows 1.4.188, and larger cross-platform incidents. The reported trigger is a short-lived Codex app-server started by Orca's quota polling; Codex's marketplace clone can outlive that process.
Disabling plugins for this rate-limit probe removes the trigger without changing normal Codex sessions, state-database recovery, user marketplace data, or the configured runtime home. A cleanup sweep alone would only reclaim old directories and would need careful asynchronous ownership checks. Upstream Codex still needs to clean orphaned marketplace temp directories created by normal sessions and concurrent processes.
Linked Issue
Related to #7725
Visual Proof
N/A — this is a background process change with no UI or interaction change.
Testing
pnpm exec vitest run src/main/codex-accounts/wsl-codex-command.test.ts src/main/codex/codex-state-db-backfill-recovery.test.ts src/main/rate-limits/codex-fetcher-process-contract.test.ts src/main/rate-limits/codex-fetcher.test.ts src/main/rate-limits/codex-fetcher-probe-shutdown.test.ts src/main/rate-limits/codex-fetcher-rpc-exit-diagnostics.test.ts(54 tests)pnpm run tc:nodepnpm run check:code-quality:changedpnpm exec oxlinton changed filesCODEX_HOME=~/.codex:initializeandaccount/rateLimits/readboth returned RPC results with plugins disabled.plugins-clone-*directories were present, confirming the unmanaged Codex temp lifecycle gap.AI Disclosure
Review
Agent skill upstream boundary
Notes
The mitigation is cross-platform and applies to local and WSL rate-limit probes. It does not attempt to delete files from the user's default
~/.codex; that cleanup remains an upstream Codex responsibility. Existing Orca PR #6404 proposes managed-home cleanup but is held for synchronous recursive scanning and ownership concerns.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (CI will cover; focused checks pass locally)