Skip to content

[plugins] Refresh plugin and tool caches after remote install#28951

Merged
adaley-openai merged 1 commit into
mainfrom
dev/adaley/refresh-remote-plugin-tools
Jun 19, 2026
Merged

[plugins] Refresh plugin and tool caches after remote install#28951
adaley-openai merged 1 commit into
mainfrom
dev/adaley/refresh-remote-plugin-tools

Conversation

@adaley-openai

@adaley-openai adaley-openai commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Refresh the installed remote-plugin snapshot and Codex Apps tools after completing a remote JIT install.
  • Gate completed: true on every expected app_connector_id appearing after the uncached tools/list refresh, while continuing to skip local bundle verification for server-side installs.
  • Keep the cached recommendations response and filter refreshed installed remote IDs locally, so this does not add another recommendations fetch.
  • Add regression coverage for tools appearing after the hard refresh and remaining absent after the refresh. The resumed model request sees the refreshed tool router when installation completes.

Root Cause

  • Remote suggestions from openai-curated-remote returned true before taking the existing connector refresh path, leaving the resumed turn with the pre-install Apps tool catalog.

Validation

  • just test -p codex-core request_plugin_install
  • just test -p codex-core-plugins recommended_plugin_candidates_filter_installed_and_disabled_plugins
  • just test -p codex-core-plugins
  • just fix -p codex-core-plugins
  • just fix -p codex-core
  • just fmt
  • just test -p codex-core was not fully clean locally: 2,729 passed, 26 failed, and 16 skipped. The failures were dominated by local Seatbelt/network/timing issues, including plugin-install timeouts under full-suite contention; the focused plugin-install runs pass.

@adaley-openai adaley-openai requested a review from a team as a code owner June 18, 2026 18:31

@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: 2ef0b5e562

ℹ️ 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/core/src/tools/handlers/request_plugin_install.rs
.into_iter()
.filter(|plugin| {
!installed_plugin_ids.contains(plugin.config_id.as_str())
&& !installed_remote_plugin_ids.contains(plugin.remote_plugin_id.as_str())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could this leave the thread stuck if these two reads briefly disagree? for example, /installed could include calendar while the post-install tools/list still omits it, so we return completed: false but also filter the recommendation. do we expect the host to keep those views in sync, or should we preserve a retry path?

@@ -1059,6 +1073,7 @@ impl PluginsManager {
.into_iter()
.filter(|plugin| {
!installed_plugin_ids.contains(plugin.config_id.as_str())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remote plugin also has config_id right?

@adaley-openai adaley-openai force-pushed the dev/adaley/refresh-remote-plugin-tools branch from 2ef0b5e to 65f8415 Compare June 18, 2026 23:48
@adaley-openai

Copy link
Copy Markdown
Contributor Author

/merge

Sent from my Codex

@adaley-openai adaley-openai merged commit 7e37354 into main Jun 19, 2026
31 checks passed
@adaley-openai adaley-openai deleted the dev/adaley/refresh-remote-plugin-tools branch June 19, 2026 00:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 19, 2026
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.

4 participants