fix(anthropic): recover Claude Code OAuth via CLI refresh fallback - #57935
Closed
woriwka-ai wants to merge 1 commit into
Closed
fix(anthropic): recover Claude Code OAuth via CLI refresh fallback#57935woriwka-ai wants to merge 1 commit into
woriwka-ai wants to merge 1 commit into
Conversation
Collaborator
|
Thanks @woriwka-ai — appreciate the thorough recovery path. Closing in favor of a root-cause fix merged via #58178. The underlying failure was that Hermes' own OAuth token exchange/refresh was blocked at the token endpoint: Anthropic 429s any Two additional reasons for the root-cause fix over the fallback here:
|
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
Adds a bounded last-resort recovery path for Claude Code OAuth credentials in
resolve_anthropic_token():CLAUDE_CODE_OAUTH_TOKEN, Claude Code credential store + pure refresh;HERMES_ANTHROPIC_DISABLE_CLAUDE_CLI_REFRESH=1.This addresses the degraded state where both persisted Claude Code sources look expired to Hermes, Hermes' direct/pure refresh loses or is blocked, but the official
claudeCLI can still refresh its own Keychain/session state. In that state Hermes/Fable can fall through toNo Anthropic credentials foundeven thoughclaude -p ...immediately restores a usable token.Related: #6347, #48534, #55051.
Testing
Result:
Live local smoke before upstreaming, with tokens redacted/not printed:
Safety notes