Skip to content

Conversation

@LaelLuo
Copy link
Contributor

@LaelLuo LaelLuo commented Nov 13, 2025

Summary

  • persist OAuth credential expiry timestamps and rehydrate expires_in
  • proactively refresh rmcp OAuth tokens when expires_at is near, then persist

Testing

  • just fmt
  • just fix -p codex-rmcp-client
  • cargo test -p codex-rmcp-client

Fixes #6572

Copy link
Contributor

@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.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@LaelLuo LaelLuo changed the title ✨ feat(rmcp-client): auto refresh OAuth tokens using expires_at 🐛 fix(rmcp-client): refresh OAuth tokens using expires_at Nov 13, 2025
@LaelLuo LaelLuo force-pushed the fix/refresh-oauth-expires-at branch from a94ed9a to f9365c4 Compare November 13, 2025 03:25
@LaelLuo
Copy link
Contributor Author

LaelLuo commented Nov 13, 2025

Updated persist_if_needed so that we reuse the previously stored expires_at whenever the token response is unchanged and only compute a new timestamp when rmcp returns fresh credentials. That keeps the expiry anchored to the original issuance time and allows the refresh skew logic to trigger instead of drifting indefinitely.

@LaelLuo
Copy link
Contributor Author

LaelLuo commented Nov 13, 2025

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gpeal gpeal merged commit f3d4e21 into openai:main Nov 18, 2025
44 of 46 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2025
@LaelLuo LaelLuo deleted the fix/refresh-oauth-expires-at branch November 21, 2025 00:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rmcp OAuth tokens never refresh based on expires_at

2 participants