Group of 2 Under the hood
Self-hosted runner's inference token refresh now uses jittered backoff, tracks token TTL, and refreshes immediately on a 401/403 instead of waiting
What
- The self-hosted runner's inference-token auto-refresh logic was rewritten. It now tracks the token's time-to-live (
ttlMs, 30 minutes by default), and retries failed refreshes with exponential backoff plus jitter (a random delay) instead of a fixed interval. - Tokens nearing expiry get a separate, shorter retry window (
expiredRetryMs). - A new error classifier distinguishes errors worth retrying from ones that aren't: a new
RemoteConfigWithoutInferenceAuthError, or an HTTP 401/403, is treated as non-network and not retried early. - A new
onResultApiErrorcallback lets a 401/403 returned by the model API during a child session's turn trigger an immediate, out-of-band token refresh (refreshNow()) instead of waiting for the next scheduled refresh.
Why This makes token refresh more resilient to transient failures while reacting immediately to real auth failures, so a self-hosted runner recovers faster from an expired or rejected inference token instead of a child session stalling until the next scheduled refresh.