hermes - 💡(How to fix) Fix NameError: _pool_may_recover_from_rate_limit not imported into extracted agent/conversation_loop.py [2 comments, 3 participants]

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…
GitHub stats
NousResearch/hermes-agent#28389Fetched 2026-05-20 04:03:54
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1cross-referenced ×1

Error Message

File "agent/conversation_loop.py", line 2335, in run_conversation pool_may_recover = _pool_may_recover_from_rate_limit( NameError: name '_pool_may_recover_from_rate_limit' is not defined

Code Example

File "agent/conversation_loop.py", line 2335, in run_conversation
    pool_may_recover = _pool_may_recover_from_rate_limit(
NameError: name '_pool_may_recover_from_rate_limit' is not defined

---

pool_may_recover = _ra()._pool_may_recover_from_rate_limit(
RAW_BUFFERClick to expand / collapse

Commit 053025238 ("refactor(run_agent): extract run_conversation to agent/conversation_loop.py") moved run_conversation into agent/conversation_loop.py. The rate-limit eager-fallback branch there calls _pool_may_recover_from_rate_limit(...) as a bare, unqualified name, but the function is defined in run_agent.py and is never imported into the extracted module. The branch only executes on a provider 429 with a fallback chain configured, so it stays latent until a rate-limit event.

Affected: origin/main HEAD, agent/conversation_loop.py ~line 2335 (the bare call site).

Traceback (on a 429 from the primary provider):

File "agent/conversation_loop.py", line 2335, in run_conversation
    pool_may_recover = _pool_may_recover_from_rate_limit(
NameError: name '_pool_may_recover_from_rate_limit' is not defined

Suggested fix: route the call through the existing _ra() lazy-import helper, consistent with how other run_agent symbols are accessed post-extraction (avoids a circular import that a top-level from run_agent import ... would risk):

pool_may_recover = _ra()._pool_may_recover_from_rate_limit(

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