Repository navigation
Conversation
… out A failed token recovery used to send BAD_CREDENTIALS "logged out by another client" for any error, keep the dead token so IsLoggedIn stayed true, and stop the poll loop for good, while every later send re-ran a password login. Network, 5xx and rate-limit failures now report TRANSIENT_DISCONNECT and the poll loop keeps retrying with capped, jittered backoff, and recovery itself backs off so sends no longer trigger a password login each. Only a rejected refresh and re-login invalidates the session, clearing the token and sending line-token-expired, which is persisted so a restart reports the same state. Idle SSE timeouts and a startup token check that fails transiently now report TRANSIENT_DISCONNECT, and CONNECTED is sent once the stream opens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
All clear! No issues remaining. 🎉 4 issues already resolved
All CI checks passed on
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
…sh startup after token recovery - Only receive, the receive auth probe and the startup token check invalidate the session when recovery fails. Sends and media can get a 403 about the object itself, so a failed recovery there only returns the error, as before. - When the startup token check fails transiently, wait for a working token in the background before running the one-shot startup work (phone notifications, E2EE storage key, block list, chat sync) and starting the workers, instead of running it against a failing token. - Retry the post-PIN account check a few times on network or server errors, so a blip doesn't throw away the approved login and prompt for another PIN.
Any other getProfile failure (an unexpected 4xx or a decode error) says nothing about the token, so start the session instead of waiting forever.
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.
A failed token recovery used to report BAD_CREDENTIALS "logged out by another client" for any error, keep the dead token so IsLoggedIn stayed true, stop the poll loop until restart, and re-run a password login on every send. Network, 5xx and rate-limit failures now report TRANSIENT_DISCONNECT and retry with capped, jittered backoff, and recovery itself backs off so sends no longer trigger password logins. Only a rejected refresh and re-login from a session-wide call (receive, the receive auth probe or the startup token check) invalidates the session: the token is cleared and line-token-expired is sent and persisted so restarts keep the same state. Sends and media only return the error, since a 403 there can be about the object. Idle SSE timeouts report TRANSIENT_DISCONNECT until the stream reopens, and a startup token check that fails transiently reports TRANSIENT_DISCONNECT and waits for a working token in the background before running the one-shot startup work and starting the workers. The account check after a PIN approval retries network and server errors so a blip doesn't cost another PIN prompt.
🤖 Generated with Claude Code