# NousResearch/hermes-agent · xAI OAuth token refresh on 403 bad-credentials

## Open now

- 1 issue, 2 PRs open on GitHub.
- #82052: \[Bug\]: xAI 403 unauthenticated:bad-credentials is classified non-retryable, so long-lived workers never refresh an expired OAuth access token
- PR #82081: fix(agent): refresh xAI OAuth credentials on a 403 bad-credentials
- PR #82153: fix(agent): refresh xAI OAuth credentials on 403 unauthenticated:bad-credentials

A bug where 403 unauthenticated:bad-credentials responses from xAI are treated as non-retryable, preventing long-lived workers from refreshing expired OAuth access tokens. The members describe the problem and related fix attempts.

## TL;DR

- 3 member(s): 1 open issue(s), 0 closed issue(s), 2 open PR(s), 0 merged PR(s), 0 PR(s) closed without merging.
- No fix has been merged to main; one or more PRs were attempted (see below).
- **Recommended:** review the prior/competing PR(s) below. A fix was attempted but not merged; your case may extend or revive that work.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. 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.67`: 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.

## Open related issues

- #82052: \[Bug\]: xAI 403 unauthenticated:bad-credentials is classified non-retryable, so long-lived workers never refresh an expired OAuth access token

## Prior & competing PRs

- **#82081: fix(agent): refresh xAI OAuth credentials on a 403 bad-credentials**. open
  - maintainer direction: category `stale_abandoned`; implication `active`; refs `#82153`, `#82052`
  - files: `agent/conversation_loop.py`, `agent/error_classifier.py`, `tests/agent/test_error_classifier_xai_stale_token.py`, `tests/run_agent/test_codex_xai_oauth_recovery.py`
- **#82153: fix(agent): refresh xAI OAuth credentials on 403 unauthenticated:bad-credentials**. open
  - maintainer direction: category `wontfix_bydesign`; implication `wontfix`; refs `8a92051f20`, `f7e6619c8b`, `f6a2ba6261`, `c739ab15f6`, `2ba6fcd750`
  - files: `agent/turn_recovery.py`, `tests/agent/test_xai_403_bad_credentials_refresh.py`

## Fix status

- No merged fix on record.
- Subsystem: `agent`
