# NousResearch/hermes-agent · Fix infinite 401 loop in agent auth fallback

## Open now

- 0 issues, 1 PR open on GitHub.
- PR #110841: fix(agent): skip fallback destinations that cannot authenticate

These items address a bug where the agent falls back to a paid model destination without valid credentials, causing repeated 401 errors. The fixes enforce credential checks before allowing fallback routing.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 1 open PR(s), 1 merged PR(s), 1 PR(s) closed without merging.
- A fix was merged to main in PR #111451. Verify it addresses your case.
- **Recommended:** read PR #111451 (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-111451`. 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.50`: 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

- #110831: Silent fallback from opencode-free to paid opencode when free model is unavailable → infinite 401 loop

## Prior & competing PRs

- **#111451: fix(agent): free-tier OpenCode model under the paid opencode profile no longer loops on 401 — keyless placeholder never sent as a bearer (#110831)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `agent/agent_runtime_helpers.py`, `agent/auxiliary_client.py`, `tests/agent/test_opencode_free_client_headers.py`
- **#110841: fix(agent): skip fallback destinations that cannot authenticate**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `debfc7420b`, `#115002`, `#110831`
  - files: `agent/chat_completion_helpers.py`, `tests/agent/test_fallback_credential_gate_110831.py`
- **#110951: fix(agent): require usable credentials before fallback**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#111451`

## Fix status

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