Repository navigation
Conversation
When a provider wraps its upstream 429 in a Python-style dict (e.g. LiteLLM proxies), diagnostic redaction replaces the message with "[Malformed diagnostic JSON redacted]" before hasLongWindowRateLimitEvidence runs. The keyword check then misses the usage-limit/subscription evidence and maybeRetryTransient schedules the full Retry-After wait (hours) as a same-model retry, holding the session. Also reject when retryAfterMs exceeds 60 s (the same threshold classifyRateLimitWindow uses), so a long-window 429 fails fast regardless of whether the message text survived redaction. Closes openclaw#179962
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR rejects same-model rate-limit retries whenever a finite Retry-After exceeds 60 seconds. Example: A redacted 429 carries Retry-After: 41294 and the saved retry-delay cap is disabled.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 5 items remain Keep open: the reported loss of usage-window evidence remains actionable, but this PR’s unconditional 60-second threshold breaks established retry behavior and causes existing recovery tests to fail. Priority: P1 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherProvider error projection supplies sanitized failure text and retry timing to attempt recovery; the retry controller decides whether to wait and continue before eligible account rotation, model fallback, or terminal failure. flowchart TD
A[Provider error and headers] --> B[Diagnostic error projection]
B --> C[Assistant failover signal]
C --> D[Attempt recovery]
D --> E[Retry controller]
E --> F[Wait and continue transcript]
E --> G[Eligible fallback or terminal error]
Technical reviewBest possible solution: Preserve bounded usage-window evidence before diagnostic redaction and let the existing retry controller retain its saved-cap and replay-safety policy. Do we have a high-confidence way to reproduce the issue? Source confirms that malformed diagnostic JSON can erase usage-window wording while retry timing survives; current main bounds the default replay-safe case, but disabled-cap and replay-unsafe paths remain affected, and no current-main runtime reproduction was run during this read-only review. Is this the best way to solve the issue? The fixed threshold confuses retry duration with usage exhaustion and bypasses controls already owned by the controller; preserving safe classification evidence addresses the reported cause without terminating legitimate temporary-throttle recovery. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 40a236feb0c3. TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +8, Tests +104. Total +112 across 2 files. Added test files: 1. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 21, 2026, 6:30 PM ET / 22:30 UTC. |
|
Thanks for the work here. We're closing this: it doesn't show a real user-facing problem (no report from an affected user and no natural reproduction), and it follows a pattern of small, speculative or duplicate changes split across many PRs. Please open an issue with a reproduction of real harm first; a fix can follow once the problem is confirmed. |
Closes #179962
What Problem This Solves
When a provider (e.g. a LiteLLM proxy) wraps its upstream 429 in a Python-style dict, OpenClaw's diagnostic redaction replaces the error message with
[Malformed diagnostic JSON redacted]beforehasLongWindowRateLimitEvidenceinspects it. The keyword regex then finds no usage-limit/subscription evidence,maybeRetryTransientaccepts the retry, and the session is held for the fullRetry-Afterduration (hours) with no user-visible explanation.User Impact
A cron-job failure-repair turn received a 429 with
Retry-After: 41294(≈11.5 h). The session was held for ~6 hours until a gateway restart. Every message the user sent meanwhile was silently queued. Nothing in the client indicated why.Why This Change Was Made
classifyRateLimitWindowalready treatsRetry-After > 60 sas a long window. The retry controller's gate only used the keyword-basedhasLongWindowRateLimitEvidence, which fails when redaction destroys the keywords. Adding the same magnitude threshold to the gate makes the classification consistent and redaction-proof.Evidence
Extracted-function reproduction (node, no build):
What was not tested
Could not run repo vitest/typecheck — no local build. Validated via extracted-function node run (above) and the added unit test
retry-evidence.long-window.test.tsonly.