fix(auth): migrate OAuth token refresh to platform.claude.com with fallback#3246
Merged
Conversation
…llback Anthropic migrated their OAuth infrastructure from console.anthropic.com to platform.claude.com (Claude Code v2.1.81+). Update _refresh_oauth_token() to try the new endpoint first, falling back to the old one for tokens issued before the migration. Also switches Content-Type from application/x-www-form-urlencoded to application/json to match current Claude Code behavior. Salvaged from PR #2741 by kshitijk4poor.
Contributor
|
1 task
This was referenced Mar 29, 2026
This was referenced Apr 7, 2026
teknium1
added a commit
that referenced
this pull request
Apr 19, 2026
Anthropic migrated their developer console from console.anthropic.com to platform.claude.com. Two user-facing display URLs were still pointing to the old domain: - hermes_cli/main.py — API key prompt in the Anthropic model flow - run_agent.py — 401 troubleshooting output The OAuth token refresh endpoint was already migrated in PR #3246 (with fallback). Spotted by @LucidPaths in PR #3237. (Salvage of #3758 — dropped the setup.py hunk since that section was refactored away and no longer contains the stale URL.)
teknium1
added a commit
that referenced
this pull request
Apr 19, 2026
Anthropic migrated their developer console from console.anthropic.com to platform.claude.com. Two user-facing display URLs were still pointing to the old domain: - hermes_cli/main.py — API key prompt in the Anthropic model flow - run_agent.py — 401 troubleshooting output The OAuth token refresh endpoint was already migrated in PR #3246 (with fallback). Spotted by @LucidPaths in PR #3237. (Salvage of #3758 — dropped the setup.py hunk since that section was refactored away and no longer contains the stale URL.)
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…llback (NousResearch#3246) Anthropic migrated their OAuth infrastructure from console.anthropic.com to platform.claude.com (Claude Code v2.1.81+). Update _refresh_oauth_token() to try the new endpoint first, falling back to the old one for tokens issued before the migration. Also switches Content-Type from application/x-www-form-urlencoded to application/json to match current Claude Code behavior. Salvaged from PR NousResearch#2741 by kshitijk4poor.
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
Anthropic migrated their developer console from console.anthropic.com to platform.claude.com. Two user-facing display URLs were still pointing to the old domain: - hermes_cli/main.py — API key prompt in the Anthropic model flow - run_agent.py — 401 troubleshooting output The OAuth token refresh endpoint was already migrated in PR NousResearch#3246 (with fallback). Spotted by @LucidPaths in PR NousResearch#3237. (Salvage of NousResearch#3758 — dropped the setup.py hunk since that section was refactored away and no longer contains the stale URL.)
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
Anthropic migrated their developer console from console.anthropic.com to platform.claude.com. Two user-facing display URLs were still pointing to the old domain: - hermes_cli/main.py — API key prompt in the Anthropic model flow - run_agent.py — 401 troubleshooting output The OAuth token refresh endpoint was already migrated in PR NousResearch#3246 (with fallback). Spotted by @LucidPaths in PR NousResearch#3237. (Salvage of NousResearch#3758 — dropped the setup.py hunk since that section was refactored away and no longer contains the stale URL.)
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…llback (NousResearch#3246) Anthropic migrated their OAuth infrastructure from console.anthropic.com to platform.claude.com (Claude Code v2.1.81+). Update _refresh_oauth_token() to try the new endpoint first, falling back to the old one for tokens issued before the migration. Also switches Content-Type from application/x-www-form-urlencoded to application/json to match current Claude Code behavior. Salvaged from PR NousResearch#2741 by kshitijk4poor.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
Anthropic migrated their developer console from console.anthropic.com to platform.claude.com. Two user-facing display URLs were still pointing to the old domain: - hermes_cli/main.py — API key prompt in the Anthropic model flow - run_agent.py — 401 troubleshooting output The OAuth token refresh endpoint was already migrated in PR NousResearch#3246 (with fallback). Spotted by @LucidPaths in PR NousResearch#3237. (Salvage of NousResearch#3758 — dropped the setup.py hunk since that section was refactored away and no longer contains the stale URL.)
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
…llback (NousResearch#3246) Anthropic migrated their OAuth infrastructure from console.anthropic.com to platform.claude.com (Claude Code v2.1.81+). Update _refresh_oauth_token() to try the new endpoint first, falling back to the old one for tokens issued before the migration. Also switches Content-Type from application/x-www-form-urlencoded to application/json to match current Claude Code behavior. Salvaged from PR NousResearch#2741 by kshitijk4poor.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…llback (NousResearch#3246) Anthropic migrated their OAuth infrastructure from console.anthropic.com to platform.claude.com (Claude Code v2.1.81+). Update _refresh_oauth_token() to try the new endpoint first, falling back to the old one for tokens issued before the migration. Also switches Content-Type from application/x-www-form-urlencoded to application/json to match current Claude Code behavior. Salvaged from PR NousResearch#2741 by kshitijk4poor.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
Anthropic migrated their developer console from console.anthropic.com to platform.claude.com. Two user-facing display URLs were still pointing to the old domain: - hermes_cli/main.py — API key prompt in the Anthropic model flow - run_agent.py — 401 troubleshooting output The OAuth token refresh endpoint was already migrated in PR NousResearch#3246 (with fallback). Spotted by @LucidPaths in PR NousResearch#3237. (Salvage of NousResearch#3758 — dropped the setup.py hunk since that section was refactored away and no longer contains the stale URL.)
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…llback (NousResearch#3246) Anthropic migrated their OAuth infrastructure from console.anthropic.com to platform.claude.com (Claude Code v2.1.81+). Update _refresh_oauth_token() to try the new endpoint first, falling back to the old one for tokens issued before the migration. Also switches Content-Type from application/x-www-form-urlencoded to application/json to match current Claude Code behavior. Salvaged from PR NousResearch#2741 by kshitijk4poor.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
Anthropic migrated their developer console from console.anthropic.com to platform.claude.com. Two user-facing display URLs were still pointing to the old domain: - hermes_cli/main.py — API key prompt in the Anthropic model flow - run_agent.py — 401 troubleshooting output The OAuth token refresh endpoint was already migrated in PR NousResearch#3246 (with fallback). Spotted by @LucidPaths in PR NousResearch#3237. (Salvage of NousResearch#3758 — dropped the setup.py hunk since that section was refactored away and no longer contains the stale URL.)
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
Anthropic migrated their OAuth infrastructure from
console.anthropic.comtoplatform.claude.com(Claude Code v2.1.81+). This updates_refresh_oauth_token()to try the new endpoint first, falling back to the old one for tokens issued before the migration.Changes:
platform.claude.com/v1/oauth/token(tried first)console.anthropic.com/v1/oauth/token(tried if primary fails)application/x-www-form-urlencodedtoapplication/jsonto match current Claude Code behaviorSalvaged from #2741 by @kshitijk4poor — the original PR was stale against current main (the PKCE flow it also modified was removed in 910ec7e), so only the surviving
_refresh_oauth_token()fix was cherry-picked.Test plan
pytest tests/test_anthropic_adapter.py tests/test_anthropic_oauth_flow.py— 79 passed