Skip to content

Keep a loaded catalog on the five-minute retry after token renewal - #70

Closed
team-humaki wants to merge 2 commits into
deyna256:mainfrom
team-humaki:main
Closed

team-humaki wants to merge 2 commits into
deyna256:mainfrom
team-humaki:main

Conversation

@team-humaki

Copy link
Copy Markdown

Closes #69

Problem

SetAccounts cleared everLoaded on any credential change, including a routine access-token renewal for the same ChatGPT account ID. A later discovery failure then used the one-second retry ladder even though a model list had already loaded.

Changes

Clear everLoaded only when ChatGPTAccountID changes (same branch that drops last-good models). A renewal still refreshes immediately and resets the failure count, but a following failed refresh stays on the five-minute interval.

Validation

go test ./internal/codex -count=1

TestCatalogTokenRenewalKeepsFiveMinuteRetry covers renewal followed by a failing refresh: no extra call after 1s, one call after 5 minutes.

@deyna256

Copy link
Copy Markdown
Owner

Thanks for working on this! We're going with #72 for this fix, so I'm closing this as a duplicate. Hope to see you contribute again!

@deyna256 deyna256 closed this Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep a loaded catalog on the five-minute retry interval when its access token is renewed

2 participants