hermes - 💡(How to fix) Fix [Bug] xAI Grok OAuth token expires within ~24h; auxiliary title generation fails with HTTP 403

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Workaround

Manually run hermes auth login xai every day.

Code Example

HTTP 403: OAuth2 access token could not be validated
RAW_BUFFERClick to expand / collapse

Bug Description

After authenticating with xAI Grok via hermes auth login xai, the OAuth access token becomes invalid within less than 24 hours. This causes auxiliary title generation (and potentially other xAI-dependent background tasks) to fail with:

HTTP 403: OAuth2 access token could not be validated

The user must manually re-authenticate (hermes auth login xai) to restore functionality.

Expected Behavior

The token should be automatically refreshed before expiry, as documented in the xAI Grok OAuth guide:

"After the first login, credentials are stored under ~/.hermes/auth.json and refreshed automatically before they expire."

Actual Behavior

  • Token expires in < 24 hours.
  • No automatic refresh occurs.
  • Background services (e.g., title generation) break silently until the user notices and manually re-logs in.

Environment

  • Hermes Agent: latest stable
  • OS: macOS
  • Auth provider: xAI Grok OAuth

Possible Cause

The automatic refresh logic may not be triggering for xAI tokens, or the refresh token itself has a very short validity window that Hermes does not account for.

Workaround

Manually run hermes auth login xai every day.

Suggested Fix

  1. Investigate why xAI token refresh is not happening automatically.
  2. If xAI's refresh window is unusually short, consider more aggressive pre-emptive refresh scheduling.
  3. Surface token expiry warnings to the user before background tasks start failing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug] xAI Grok OAuth token expires within ~24h; auxiliary title generation fails with HTTP 403