Repository navigation
fix(auth): don't retry rate-limited identity probes for direct credentials - #325
Merged
Merged
Conversation
…tials fetchProbe used fetchWithRetry's default of three retries, so a direct credential Cloudflare had rate-limited cost up to four calls per probe, two probes per request, which kept the token limited. Send it once and return the 429 with Cloudflare's Retry-After. The OAuth callback probe, which a person waits on while signing in, keeps its retries.
mattzcarey
force-pushed
the
fix/identity-probe-no-429-retry
branch
from
October 22, 2026 10:56
b16b915 to
5f0c9b7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Identity probes for direct Cloudflare credentials no longer retry a 429. The client gets
429 temporarily_unavailablewith Cloudflare'sRetry-Afterstraight away. The OAuth callback probe, which runs once while a person waits to sign in, keeps its retries.The retries made rate limiting worse:
fetchProbeusedfetchWithRetry's default of 3 retries, and a user-token request probes/userand/accounts, so one request could send 8 calls with a token Cloudflare had already limitedapi_token_identity_probe … after 4 attempts with status 429logged ~149k errors in the 13.5 h after yesterday's incidentTests ran (
npm run check). The newtests/auth/identity-probe-retries.test.tsuses the realfetchWithRetry: a rate-limited direct probe sends 1 + 1 requests (4 + 4 without this change), and the OAuth callback probe still retries a 429.Pairs with #324, which stops probing expired MCP access tokens.