Expand description
A Claude CLI request that is being retried, from the CLI’s own frames.
When a request to the API fails in a way the CLI treats as transient (no
connection, a 5xx), it waits and tries again, up to its own limit, and
writes one system/api_retry frame per attempt:
{attempt, max_retries, retry_delay_ms, error_status, error}. With the
network down that is minutes of a busy-looking pane with nothing else on
stdout, so the pane shows the retry, with Stop.
Published as the per-pane agent-api-retry event, and answered for a pane
that opens mid-retry by agentapiretry. Cleared by the next frame that is
neither system nor user (a reply arrived, or the turn’s result), and
when the stdout reader ends, however it ends (ApiRetryReader).
The wait goes out as time remaining, computed when srv sends it, never as
a deadline: srv’s clock and the renderer’s need not agree. So the event is
not persisted (a replay would carry a stale remainder); srv keeps the
current retry here instead. Every change carries a rising revision, and
the pane applies only a newer one than it has: events and the
agentapiretry answer can arrive out of order.
Structs§
- ApiRetry
Event - The
agent-api-retryevent’s payload (mps_events::AgentApiRetry), andagentapiretry’s answer: the retry in progress, ornullwhen none is. - ApiRetry
Reader - One stdout reader’s part in its pane’s retry state. Dropping it clears a
retry it set, so a reader that ends any way, including aborted mid-read
(
process_waiter.rssettle_reader_tasks), never leaves one behind. - ApiRetry
State - One retry the CLI is waiting on, as the pane gets it.
- Command
Agent ApiRetry Data agentapiretry’s request: the pane asking.
Functions§
- current_
api_ retry agentapiretry: the pane’s retry as of now.