7 months ago
02f6a3dFour fixes addressing the token being reported as "gone" after closing and reopening the desktop app: 1. Retry token refresh with backoff (3 attempts, 500ms/1s/2s) instead of a single attempt — transient network errors no longer cause permanent "not connected" state. 2. Add console.warn logging around every refresh attempt so failures are diagnosable from server logs. 3. Add `tokenRecoverable` field to ProviderStatus. When the access token is expired but a refresh token still exists, the desktop persistence layer now skips saving the "not connected" status, preventing stale state from sticking across restarts. 4. Guard against cross-process refresh races in refreshCodexAuthMaterial: re-read the auth file before writing and skip the write if another process already persisted a fresh token. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parent1584a54