# NousResearch/hermes-agent · Anthropic sk-ant-usr key misclassification fix

## Open now

- Nothing open on GitHub.

A bug where Anthropic API keys with the sk-ant-usr prefix are incorrectly classified as OAuth tokens instead of x-api-key credentials. Multiple fixes and a bug report address correcting this classification logic.

## TL;DR

- 7 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 5 PR(s) closed without merging.
- A fix was merged to main in PR #137140. Verify it addresses your case.
- **Recommended:** read PR #137140 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-137140`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.29`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #133856: \[Bug\]: Anthropic API keys with sk-ant-usr- prefix are misclassified as OAuth tokens (Claude Code identity on a pay-per-token key)

## Prior & competing PRs

- **#137140: fix(auth): Anthropic Console keys (sk-ant-usr/svc/admin) authenticate as x-api-key, not OAuth (#133856, salvage #133874)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/anthropic_adapter.py`, `agent/anthropic_credentials.py`, `tests/agent/test_anthropic_adapter.py`, `tests/agent/test_anthropic_client_auth.py`, `tests/agent/test_anthropic_route_oauth_identity.py`
- **#133874: fix(auth): classify sk-ant-usr* API keys as x-api-key, not OAuth**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `82ef40ab29`, `#137140`
- **#133875: fix(auth): classify Anthropic user keys as API keys**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#133856`, `#133874`
- **#135172: fix(anthropic): stop treating sk-ant-usr workspace API keys as OAuth tokens**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `82ef40ab29`, `#137140`
- **#135734: fix(agent): _is_oauth_token() misclassifying sk-ant-svc/usr keys as OAuth**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`; refs `d50ab2a5dc15b2d0c528b11b37ab33743b3de7e0`, `cf23a1a5cc3e02b2a2d4526b4a1ac66ffaac614b`, `26610b09a5c4aead8d8dfb276ea33decf0d7fa46`, `d50ab2a5dc15b2d0c528b11b37ab33743b3de7e0`, `d50ab2a5dc15b2d0c528b11b37ab33743b3de7e0`, `d50ab2a5dc15b2d0c528b11b37ab33743b3de7e0`, `d50ab2a5dc15b2d0c528b11b37ab33743b3de7e0`, `d50ab2a5dc15b2d0c528b11b37ab33743b3de7e0`, `#101555`, `#123361`, `#107448`, `#75697`, `#113992`, `#80307`, `#135091`, `#133874`, `#135172`
- **#136142: fix(anthropic): route API key families through x-api-key, not OAuth**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `82ef40ab29`, `#137140`

## Fix status

- Merged to main in PR #137140 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-10-12`.
- Subsystem: `agent`
