Replies: 1 comment
|
i'm going to keep the retry loop already self-corrects when it wakes too early. On a limit hit with i don't follow the "less reliable for long unattended runs" point in the writeup. The fixed wait always retries and eventually gets through, so there's no reliability gap to close here, just some wasted minutes or an extra cycle. That's an efficiency thing, not correctness. the case that would actually benefit is the absolute form from #361, it'd also be Claude-only. Under |
Uh oh!
There was an error while loading. Please reload this page.
Summary
Currently, when ralphex detects a Claude/Codex rate limit and
--wait/wait_on_limitis configured, it waits for the fixed user-provided duration and then retries.This works, but Claude often prints a more precise reset time, for example:
or messages like:
Since ralphex already captures the executor output and detects limit patterns, it could potentially use that reset information to wait until the actual reset time instead of always sleeping for the configured fixed duration.
Motivation
A fixed
--waitduration is hard to choose correctly:--waitless reliable than it could be.Claude sometimes tells us exactly when the limit will reset, so ralphex could make a better decision automatically.
Proposed behavior
When a limit pattern is detected and
--wait/wait_on_limitis enabled:--waitduration.Example log message:
For relative reset messages:
Compatibility / fallback
This could preserve the current behavior:
--wait/wait_on_limitis not enabled, ralphex should continue to exit as it does today.--wait 1h,--wait 30m, etc. would continue to work.Related existing behavior
PR #168 added the current
--wait/wait_on_limitretry behavior.Issue #361 shows an example where Claude prints:
but the expected behavior there is still based on waiting the configured duration. This proposal is a small extension: when the reset time is available, use it instead of guessing.
Discussion vs issue
I am opening this as a discussion first because I am not sure whether this fits the intended scope of
--wait.If this behavior makes sense, I can convert it into a proper issue with a more concrete implementation proposal.
All reactions