Skip to content

Reset ChatGPT Codex auth during OAuth setup#8569

Open
vincenzopalazzo wants to merge 3 commits intoaaif-goose:mainfrom
vincenzopalazzo:fix/chatgpt-codex-auth-reset
Open

Reset ChatGPT Codex auth during OAuth setup#8569
vincenzopalazzo wants to merge 3 commits intoaaif-goose:mainfrom
vincenzopalazzo:fix/chatgpt-codex-auth-reset

Conversation

@vincenzopalazzo
Copy link
Copy Markdown
Contributor

Summary

  • force chatgpt_codex reconfiguration to start a fresh OAuth flow instead of silently reusing cached tokens
  • restore the previous cached token if the new OAuth attempt fails or is cancelled
  • register chatgpt_codex cleanup so deleting the provider clears cached OAuth state

Review Notes

  • Production-safety review passed (3 rounds)
  • Focus area: explicit re-auth should let users switch ChatGPT subscriptions without breaking existing auth on failed relogin

Test plan

  • cargo test -p goose chatgpt_codex --no-default-features --features rustls-tls -- --nocapture
  • cargo clippy -p goose --no-default-features --features rustls-tls --lib -- -D warnings
  • CI passes
  • Reconfigure ChatGPT Codex after existing login and verify browser flow prompts for a fresh login
  • Cancel reconfigure midway and verify the previous login still works

vincenzopalazzo and others added 2 commits April 16, 2026 01:26
Co-authored-by: goose <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
Co-authored-by: goose <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9bcb84262

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/goose/src/providers/chatgpt_codex.rs Outdated
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
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.

1 participant