hermes - 💡(How to fix) Fix Surface rate limit reset time in user-facing status messages [1 pull requests]

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…

Error Message

"error": {

  1. Parse resets_in_seconds from error payload in _extract_api_error_context() (after resets_at/reset_at but before retry_after)

Fix Action

Fixed

Code Example

⏱️ Rate limited. Waiting 60.0s (attempt 2/3)...

---

{
  "error": {
    "type": "usage_limit_reached",
    "message": "The usage limit has been reached",
    "plan_type": "plus",
    "resets_at": 1778839243,
    "resets_in_seconds": 756
  }
}

---

⏱️ Rate limited. Resets in ~13m. Waiting 60.0s (attempt 2/3)...
RAW_BUFFERClick to expand / collapse

Problem

When the LLM provider returns a 429 rate limit, Hermes shows:

⏱️ Rate limited. Waiting 60.0s (attempt 2/3)...

But many providers include when the rate limit resets in the response body. This information is already parsed into error_context["reset_at"] by _extract_api_error_context() but is never surfaced to the user.

For Telegram/messaging users especially, knowing "resets in ~13 minutes" vs just "rate limited" is the difference between waiting patiently and wondering what's happening.

Specific issue: Codex resets_in_seconds not parsed

The Codex/ChatGPT 429 response body includes resets_in_seconds (e.g. 756), but _extract_api_error_context() only checks for resets_at, reset_at, and retry_after keys. The resets_in_seconds field is silently ignored.

Example Codex 429 body:

{
  "error": {
    "type": "usage_limit_reached",
    "message": "The usage limit has been reached",
    "plan_type": "plus",
    "resets_at": 1778839243,
    "resets_in_seconds": 756
  }
}

(resets_at IS there in this case, but in epoch format — the separate resets_in_seconds field is the human-friendly one.)

Suggested fix

  1. Parse resets_in_seconds from error payload in _extract_api_error_context() (after resets_at/reset_at but before retry_after)
  2. Format error_context["reset_at"] into the _emit_status message at the retry point in the main agent loop (~line 13263 in run_agent.py), e.g.:
⏱️ Rate limited. Resets in ~13m. Waiting 60.0s (attempt 2/3)...

This is a small change — the parsing infrastructure already exists, it just needs the additional key and the format string.

Environment

  • Hermes v0.13.0
  • Provider: openai-codex (ChatGPT Plus)
  • Platform: Telegram gateway

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