Skip to content

Refresh remote plugin cache on auth changes#20265

Merged
xli-oai merged 2 commits into
mainfrom
xli-codex/remote-plugin-cache-key
May 1, 2026
Merged

Refresh remote plugin cache on auth changes#20265
xli-oai merged 2 commits into
mainfrom
xli-codex/remote-plugin-cache-key

Conversation

@xli-oai

@xli-oai xli-oai commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Refresh the remote installed-plugin cache after login/logout instead of keying it by account or eagerly clearing it.
  • Reuse the existing single-flight remote installed refresh loop so newer queued auth refreshes replace older pending requests and the API result eventually overwrites or clears the cache.
  • Keep derived plugin/skills cache and MCP refresh side effects behind the existing effective-plugin-changed task when the refreshed installed state changes.
  • Leave clear_plugin_related_caches scoped to derived plugin/skills caches so share mutations do not drop remote installed plugins.

Tests

  • cargo fmt --all --manifest-path codex-rs/Cargo.toml (passes; stable rustfmt warns that imports_granularity = Item is nightly-only)
  • cargo test -p codex-core-plugins remote_installed_cache
  • cargo test -p codex-app-server skills_list_loads_remote_installed_plugin_skills_from_cache

@xli-oai xli-oai requested a review from a team as a code owner April 29, 2026 21:38
@xli-oai xli-oai added the oai PRs contributed by OpenAI employees label Apr 29, 2026 — with ChatGPT Codex Connector

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

.plugins_for_config(config)

P1 Badge Pass auth when computing tool-suggest connector IDs

tool_suggest_connector_ids now calls plugins_for_config(config) without auth. After this commit, remote-installed plugin configs are returned only when the account-scoped cache key is present, so this path drops remote plugin connector IDs. list_tool_suggest_discoverable_tools_with_auth then filters them out, so connectors from remote-installed plugins stop appearing in tool suggestions.


let mcp_config = config.to_mcp_config(self.plugins_manager.as_ref()).await;

P1 Badge Thread auth into configured MCP server resolution

configured_servers still builds MCP config via to_mcp_config(...) (no auth). With the new account-keyed remote plugin cache, that omits remote-installed plugin MCP servers entirely. Callers like app-server MCP refresh/OAuth flows using configured_servers can no longer find remote plugin servers, causing refreshes to drop them or OAuth login to fail with “No MCP server named ...”.


.plugins_for_config(config)

P1 Badge Pass auth when merging plugin apps into connector list

list_all_connectors_with_options fetches authenticated connector data, but plugin_apps_for_config still calls plugins_for_config(config) without auth. After account-keyed remote plugin caching, remote-installed plugin apps are omitted here, so plugin-provided connectors disappear from the merged connector list for logged-in users.

ℹ️ 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".

@xli-oai

xli-oai commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch 2 times, most recently from c414c0f to 3b6c42c Compare April 30, 2026 23:48

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

Copy link
Copy Markdown
Contributor

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: 5f79953f8d

ℹ️ 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 codex-rs/app-server/src/codex_message_processor.rs Outdated
Comment thread codex-rs/core-plugins/src/manager.rs Outdated
Comment thread codex-rs/core-plugins/src/manager.rs
Comment thread codex-rs/core-plugins/src/manager.rs Outdated
@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch 7 times, most recently from 4edeb33 to 11ba7ac Compare May 1, 2026 00:51
@xli-oai

xli-oai commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: 11ba7ac58d

ℹ️ 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 codex-rs/app-server/src/codex_message_processor.rs Outdated
@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch from 11ba7ac to ed5cad7 Compare May 1, 2026 01:11
@xli-oai

xli-oai commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: ed5cad747e

ℹ️ 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 codex-rs/app-server/src/codex_message_processor.rs
Comment thread codex-rs/app-server/src/codex_message_processor.rs
Comment thread codex-rs/core-plugins/src/manager.rs Outdated
@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch 2 times, most recently from 7e34315 to ab92d79 Compare May 1, 2026 03:17
@xli-oai xli-oai changed the title Key remote plugin cache by account Refresh remote plugin cache on auth changes May 1, 2026
@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch 8 times, most recently from 0d47d45 to 209f248 Compare May 1, 2026 03:38

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

Copy link
Copy Markdown
Contributor

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: b9e433d903

ℹ️ 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 codex-rs/app-server/src/codex_message_processor.rs Outdated
@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch from 209f248 to e3e058d Compare May 1, 2026 03:41
@xli-oai

xli-oai commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🎉

ℹ️ 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".

@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch 4 times, most recently from 47c79d4 to e3e058d Compare May 1, 2026 04:40
@xli-oai xli-oai force-pushed the xli-codex/remote-plugin-cache-key branch from e3e058d to 3c92d6c Compare May 1, 2026 04:51
&outgoing_clone,
auth_manager,
config_manager,
thread_manager,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

send_chatgpt_login_completion_notifications take too many params and will break CI, so replace auth_manager with thread_manager instead of creating a new xxxContext :)

@xli-oai xli-oai merged commit a62b52f into main May 1, 2026
25 checks passed
@xli-oai xli-oai deleted the xli-codex/remote-plugin-cache-key branch May 1, 2026 06:11
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants