Summary
The --wait flag (added in #168) currently kicks in for rate-limit retry during the default/full execution mode, but does not appear to apply when running ralphex in --plan, --review (-r), or --external-only (-e) modes. Hitting a rate limit in any of these modes still exits the process instead of waiting and retrying.
Motivation
The other modes are just as long-running as the main loop and just as likely to bump into Claude/Codex rate limits:
- plan mode — interactive plan creation can take many turns; losing the session on a limit means redoing the whole interview.
- review mode — full review pipeline runs many executor calls; a limit hit late in the run discards the work.
- external-review mode — by design this is a long iterative loop; it is the most likely to hit limits.
Right now users have to babysit these modes or restart manually, which defeats the purpose of --wait as a "set it and forget it" rate-limit recovery mechanism.
Proposal
Make --wait (and the corresponding wait_on_limit config option) honored uniformly across all modes:
--plan
--review / -r
--external-only / -e (and the deprecated --codex-only alias)
--tasks-only / -t (for completeness)
Behavior should match what already happens in full mode: when a limit pattern matches and wait_on_limit is configured, sleep for the configured duration and retry indefinitely until success or context cancellation (Ctrl+C).
Priority
Nice-to-have / quality-of-life. The flag exists and the retry plumbing exists; this is about making sure every mode routes its executor calls through the same retry wrapper.
Summary
The
--waitflag (added in #168) currently kicks in for rate-limit retry during the default/full execution mode, but does not appear to apply when running ralphex in--plan,--review(-r), or--external-only(-e) modes. Hitting a rate limit in any of these modes still exits the process instead of waiting and retrying.Motivation
The other modes are just as long-running as the main loop and just as likely to bump into Claude/Codex rate limits:
Right now users have to babysit these modes or restart manually, which defeats the purpose of
--waitas a "set it and forget it" rate-limit recovery mechanism.Proposal
Make
--wait(and the correspondingwait_on_limitconfig option) honored uniformly across all modes:--plan--review/-r--external-only/-e(and the deprecated--codex-onlyalias)--tasks-only/-t(for completeness)Behavior should match what already happens in full mode: when a limit pattern matches and
wait_on_limitis configured, sleep for the configured duration and retry indefinitely until success or context cancellation (Ctrl+C).Priority
Nice-to-have / quality-of-life. The flag exists and the retry plumbing exists; this is about making sure every mode routes its executor calls through the same retry wrapper.