fix(auth): handle Nous Portal token expiry with refresh + graceful error (#58572) - #59718
Closed
SquabbyZ wants to merge 1 commit into
Closed
fix(auth): handle Nous Portal token expiry with refresh + graceful error (#58572)#59718SquabbyZ wants to merge 1 commit into
SquabbyZ wants to merge 1 commit into
Conversation
…ror (NousResearch#58572) Fixes NousResearch#58572 The gateway crashed when its Nous Portal token expired — no auto-refresh, no user-facing recovery path. The whole gateway process went down with it. * hermes_cli/auth.py: catches the 401/403 "token expired" response, triggers the refresh-token flow when available, retries the request. When refresh fails, surfaces a clear error to the operator rather than crashing the gateway. * Circuit breaker prevents retry-looping on a permanently-bad token. * New tests/auth/test_portal_token_expiry.py covers auto-refresh, no-refresh graceful error, and circuit-breaker behavior. AI-assisted fix by https://github.com/SquabbyZ/peaks-loop
1 task
Contributor
|
Thanks for the focused auth recovery work. An automated hermes-sweeper review found that current
Closing as implemented on main. This is an automated hermes-sweeper review. |
This was referenced Aug 3, 2026
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.
Fixes #58572
Summary
The gateway crashed when its Nous Portal token expired — no auto-refresh, no user-facing recovery path. The whole gateway process went down with it.
What changed
Platforms tested
AI-assisted contribution
This PR was drafted as part of an automated contribution sweep driven by https://github.com/SquabbyZ/peaks-loop. The original sub-agent was interrupted by a token-plan outage; this commit was recovered from the worktree state.