Repository navigation
fix: stop Deep Scan workers when usage is exhausted - #1638
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Thanks for addressing the dispatch race as well as retry classification. The immediate callback and eventual thrown error serve different purposes: cancellation must reach the coordinator before SDK stream cleanup finishes. Preserving the original quota error through shutdown is also the right behavior. I would keep the fresh/resumed discovery and reducer coverage and both coordinator timing cases. Restricting classification to terminal turn failures correctly leaves temporary rate limits and similar text in ordinary output alone. The documentation accurately describes stopping after exhaustion. No additional changes suggested. |
|
it seems buggy now... could u look into that? @mldangelo-oai |
Summary
Deep Scan treated exhausted usage limits as retryable worker failures. It could retry the failed worker and launch replacements while other workers were shutting down.
Changes
Recognize Codex's terminal quota messages and immediately cancel the scan's active workers. Prevent retries and replacements, retain completed artifacts, and preserve the original error in the scan result. Ordinary temporary rate limits keep their existing retry behavior.
Testing
build:ci, source-compatibility checks and tests, MCP type checking, formatting, and the plugin build.usage_limit_reachedandinsufficient_quota. Both produced the expected permanent failure and cancellation notification, with one model request per case.Risk and rollout
The current Codex SDK exposes terminal failures as text, so classification matches the pinned version's native quota messages. Upstream wording changes may require an update. This stops work after exhaustion and does not add a pre-exhaustion budget guardrail.
The native integration check ran on macOS with synthetic responses. No real account allowance was exhausted. A full repository test run was not repeated for this narrowed change.
Public disclosure review