← All changes
fix· Models

A rejected Codex token is refreshed instead of asking you to reconnect

When ChatGPT rejects your Codex connection's access token before any work starts, Sinatra now refreshes the connection and retries the turn once.

ChatGPT sometimes expires an access token well before the expiry it gave us. We only refreshed a token close to that stated expiry, so the one retry reused the dead token and the turn failed with "Reconnect Codex", even though a refresh would have worked. Now that retry runs on a refreshed token. If ChatGPT also turns down the refresh token, you still see the reconnect message, and reconnecting is the fix. A turn whose refresh fails for a temporary reason fails as before and isn't retried a second time.