Repository navigation
Conversation
A GET that fails with a 5xx, a transport error or a truncated body is retried twice, after one and two seconds. A review makes many file and API reads, and GitHub occasionally answers one with a 5xx that the same request succeeds on moments later, so a single transient failure aborted the whole run with exit 5. Rate limits (429), client errors and writes are not retried, and the wait ends with the context. Twapp-Session: a1c84e67-5d09-4d88-9b16-ebfd33557c24
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.
Summary
A review aborts with exit 5 when any one GitHub read returns a 5xx, for example:
mapHTTPStatusalready classifies 5xx, transport errors and truncated bodies asErrRetryable, but only the outbox acts on that, for posts. Reads made while planning a review (agent files, diffs, PR metadata) give up on the first failure. A review makes many reads, and GitHub occasionally answers one with a 5xx that the same request returns moments later. One repository failed four reviews in a row this way, each on a different.codereview/agents/**file, while direct fetches of those files returned in under half a second.doRESTWithTokennow retries a GET that fails withErrRetryabletwice, after one and two seconds. Not retried:doRESTJSONand GraphQL);Tests
internal/gitprovider/github/http_retry_test.gocovers recovery after 500 and 504, giving up after three attempts, no retry on 404, 429 or 401, no retry for a PATCH, and an early stop when the context is cancelled. Against the previous request code, the recovery and give-up tests fail.make checkpasses.Model: Claude Opus 5.5 (1M context, xhigh effort) in Claude Code.