Retry ignores retry-after and mid-stream failures #199

Open
opened 2026-11-21 12:36:47 +00:00 by johannes · 0 comments
Owner

Location: crates/hx-core/src/agent.rs (stream with retries, ~line 428)
What is hacky: fixed backoff; Error::Api carries no headers; mid-stream errors are not retried.
Proper fix: carry retry-after in the error and honor it; resume or retry mid-stream failures.
Original comment: "ponytail: ignores retry-after (Error::Api carries no headers) and mid-stream failures; add if seen."

Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).

Location: crates/hx-core/src/agent.rs (stream with retries, ~line 428) What is hacky: fixed backoff; `Error::Api` carries no headers; mid-stream errors are not retried. Proper fix: carry retry-after in the error and honor it; resume or retry mid-stream failures. Original comment: "ponytail: ignores `retry-after` (Error::Api carries no headers) and mid-stream failures; add if seen." Found by the comment audit: the comment excusing this was deleted (see scripts/lint-comments.sh).
johannes added the core label 2026-11-21 12:36:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#199