Skip to content

Copilot harness: honour Retry-After on HTTP 429 instead of retrying inside the window #76767

Done

Description

@prinsloopieter

The Copilot harness (v1.0.1, actions/setup/js/copilot_harness.cjs) classes a per-user model rate limit (HTTP 429, header x-ratelimit-exceeded: global-chat:...:userID, retry-after: 245) as partial_execution and retries with --continue on its fixed schedule (5, 10, 20 s). All three retries fall inside the window, so the run is wasted. engine.fallback-models does not help: the docs say HTTP 429 never switches model. Neither harness_retry_config.cjs nor the harness reads Retry-After.

Request: (1) when the upstream error is a 429 with Retry-After, wait that long (bounded by max-delay-ms and the job timeout) before the next attempt, or fail fast with a distinct failure class when it exceeds the bound; (2) optionally let fallback-models apply to a per-user 429 as an opt-in. Workaround today: engine.harness with a long initial-delay-ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions