fix(codex): allow slow provider probes to finish #9303
main fromrefs/pull/9303/head·opened View on GitHubProblem#
The Codex provider health check performs a full app-server handshake plus account, model, and skill discovery under the shared 10-second auth-probe timeout. On Windows, healthy probes have been measured above that limit during startup, causing an installed and authenticated provider to appear broken until a later refresh.
Closes #7513.
Fix#
Give the multi-step Codex probe a 20-second budget while leaving other provider probe timeouts unchanged. A focused virtual-clock regression test verifies that a 15-second healthy probe succeeds, and the existing timeout cleanup test now covers the new boundary.
Testing#
node_modules/.bin/vp test run apps/server/src/provider/Layers/ProviderRegistry.test.ts(42 passed)- targeted lint and formatting checks
Model: GPT-5.6 Sol Harness: Codex in T3 Code
Note
Low Risk Scoped to Codex health-check timing and tests; no auth or data-path changes.
Overview Raises the Codex provider status probe timeout from the shared 10s to a Codex-specific 20s, because the app-server handshake plus account, model, and skill discovery can exceed 10s on Windows without indicating a real failure.
Other providers keep using AUTH_PROBE_TIMEOUT_MS from providerSnapshot.ts. Tests add a case where a 15s healthy probe still reports ready, and the hanging-probe timeout test advances the clock 21s to match the new limit.
Summary by CodeRabbit#
- Bug Fixes
- Improved Codex provider detection by allowing longer startup checks to complete successfully.
- Reduced false timeout results for Codex checks on slower systems or during concurrent startup activity.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Note: GPT-6 on behalf of shivam (@shivamhwp).
Please rebase the Codex timeout change onto current main. The import hunk conflicts with the newer custom-model and usage-limit work; keep
readCustomModelEntries,COMPACT_SLASH_COMMAND, and the current rate-limit helpers while replacing only the auth-probe timeout.Bugbot is paused — on-demand spend limit reached
Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.
A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.
Rebased onto current
main(68c2277f5) and resolved the import conflict by retainingreadCustomModelEntries,COMPACT_SLASH_COMMAND, and the current usage/rate-limit helpers. The behavioral diff still only gives the Codex auth probe its 20-second budget; other provider probe timeouts remain unchanged.Verification on
6931f69cf:ProviderRegistry.test.ts: 51 passed- server typecheck passed
- changed-file lint, formatting, and
git diff --checkpassed
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
66792e61-5ab2-4793-a837-e101942367d0📥 Commits
Reviewing files that changed from the base of the PR and between 2db675aeffd9cb1e8b5ad76ddd018433b45b02e9 and 6931f69cf49a278e5cfa0d47248fab718a0e12b1.
📒 Files selected for processing (2)
apps/server/src/provider/Layers/CodexProvider.tsapps/server/src/provider/Layers/ProviderRegistry.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
Walkthrough#
The Codex provider probe timeout increases from 10 to 20 seconds. Tests verify that a 15-second probe succeeds and that timeout cleanup remains covered.
Changes#
Codex probe timeout
Layer / File(s) Summary Codex timeout implementation
apps/server/src/provider/Layers/CodexProvider.tsAdds a file-local 20-second timeout for the Codex app-server probe and uses it in checkCodexProviderStatus.Probe timeout validation
apps/server/src/provider/Layers/ProviderRegistry.test.tsAdds coverage for a 15-second successful probe and updates timeout cleanup timing to 21 seconds. Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
maria-rcksMerge Risk: ⚪ Minimal · up to
6931fThe change is limited to allowing slower Codex startup probes to complete; no unresolved merge-blocking risk remains.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Title check ✅ Passed The title clearly and concisely describes the main change: allowing slow Codex provider probes to complete. Description check ✅ Passed The description explains the problem, the fix, scope, linked issue, and testing. It does not use the template headings exactly and omits the checklist, but it provides the required change rationale an… Linked Issues check ✅ Passed Issue #7513requires Codex probes to avoid premature timeout during slow Windows startup without changing other provider behavior.CodexProvider.tsremoves the shared 10-second timeout use, adds `CO…Out of Scope Changes check ✅ Passed The pull request changes only the Codex probe timeout and related regression tests. The changes directly support issue #7513and do not modify unrelated provider behavior.Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2… ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Comment `@coderabbitai help` to get the list of available commands.Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.
Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.
juliusmarminge closed this
Sign in to join this conversation.
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This narrowly scoped change raises the default Codex provider-probe timeout from 10 to 20 seconds for all enabled users, altering existing product behavior even though it includes focused regression coverage. The default-policy change warrants explicit human review.
Not approved because:
- Monthly spending limit reached (workspace setting). Approvability relies on correctness review in order to determine eligibility
Review your spending limits in [Billing settings](https://app.macroscope.com/pingdotgg/settings/billing). You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).