You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex OAuth refresh can race across concurrent expired requests #28234
Codex OAuth refresh can race when multiple requests enter the provider fetch path with an expired access token at the same time.
Each request sees expired auth state and independently calls the refresh-token grant with the same stored refresh token. Because the refresh token rotates, one refresh can succeed while the later concurrent refresh fails. This surfaces as intermittent Codex OAuth refresh failures instead of sharing the first successful refresh result.
Plugins
Built-in OpenAI / Codex OAuth provider
OpenCode version
dev branch as of May 18, 2026
Steps to reproduce
Sign in with OpenAI / Codex OAuth.
Let the stored access token expire.
Start two Codex-backed requests concurrently before refreshed auth state has been persisted.
Observe multiple refresh attempts using the same previous refresh token; one attempt may fail after the token rotates.
Activity