# NousResearch/hermes-agent · Credential pool exhaustion error handling fixes

## Open now

- 1 issue, 3 PRs open on GitHub.
- #40960: \[Bug\] credential pool exhaustion causes misleading 401 instead of real 429/402
- PR #40961: fix(auth): return exhausted credential key instead of empty string
- PR #47718: fix(copilot): don't seed a Copilot pool credential from a classic ghp_ GITHUB_TOKEN (#47708)
- PR #57137: fix(auth): surface real upstream 429 when all pool entries exhausted (#40960)

These issues and PRs address how the system behaves when a credential pool is exhausted, specifically ensuring the real upstream error (429/402) is surfaced rather than a misleading 401, and that the exhausted credential key is returned instead of an empty string. A related fix prevents seeding Copilot pool credentials from classic GitHub tokens.

## TL;DR

- 5 member(s): 1 open issue(s), 0 closed issue(s), 3 open PR(s), 0 merged PR(s), 1 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.40`: 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

- #40960: \[Bug\] credential pool exhaustion causes misleading 401 instead of real 429/402

## Prior & competing PRs

- **#40961: fix(auth): return exhausted credential key instead of empty string**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `hermes_cli/auth.py`
- **#42475: fix(auth): return exhausted credential key instead of empty string on pool exhaustion (#40960)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `8041be795419ee00890bbc6efd075c1459684acd`
- **#47718: fix(copilot): don't seed a Copilot pool credential from a classic ghp_ GITHUB_TOKEN (#47708)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `agent/credential_pool.py`, `tests/tools/test_credential_pool_env_fallback.py`
- **#57137: fix(auth): surface real upstream 429 when all pool entries exhausted (#40960)**. open
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#40961`, `#40961`, `#40960`, `#42475`
  - files: `hermes_cli/auth.py`

## Fix status

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