[codex] Reuse parsed plugin skills during session startup - #28844
Merged
Conversation
xl-openai
force-pushed
the
xl/plugin-skill-cache
branch
from
June 18, 2026 04:27
34763b5 to
4edd999
Compare
xl-openai
force-pushed
the
xl/plugin-skill-cache
branch
from
June 18, 2026 05:01
4edd999 to
242d739
Compare
xl-openai
force-pushed
the
xl/plugin-skill-cache
branch
3 times, most recently
from
June 18, 2026 07:25
700c53a to
3bef94a
Compare
xl-openai
marked this pull request as ready for review
June 18, 2026 07:28
| }; | ||
| let cached_snapshot = cache_key.as_ref().and_then(|cache_key| { | ||
| let plugin_skill_snapshots = plugin_skill_snapshots?; | ||
| plugin_skill_snapshots |
Contributor
There was a problem hiding this comment.
Could we invalidate these snapshots when SkillsService is cleared? The app-server watcher only clears the skills cache, so a plugin SKILL.md edit can still reuse stale metadata on the next turn after skills/changed fires.
Contributor
Author
There was a problem hiding this comment.
Good catch. I took a closer look, and I think the issue is actually that plugin-owned skill roots shouldn’t be registered with SkillsWatcher in the first place. Plugin install/update/uninstall owns invalidating plugin state, including these snapshots. I pushed ce979d1 to exclude plugin roots from watcher registration rather than coupling SkillsService cache clears back into PluginsManager. Thanks for flagging this!
xl-openai
force-pushed
the
xl/plugin-skill-cache
branch
from
June 18, 2026 20:16
036f870 to
ce979d1
Compare
sayan-oai
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SkillsLoadInputas an optional preload, so session startup reuses plugin parsing while ordinary skill loads passNone.Why
Plugin discovery already parses plugin skills to determine available capabilities. Cold session startup then scanned and parsed the same roots again while building the skills snapshot.
This solves the same duplicate-work problem as #28623 while keeping ownership narrow:
PluginsManagercreates and ownsPluginSkillSnapshotsonly for its loaded-plugin cache entry;SkillsServiceconsumes an optional clone. Entry replacement or clearing naturally drops the snapshots, with no separate generation, capacity policy, or watcher coupling.Validation
cargo clippy -p codex-core-skills --all-targets -- -D warningsjust test -p codex-core-plugins skills_service_reuses_skills_parsed_during_plugin_loadjust test -p codex-core-skills namespaces_plugin_skills_using_provided_namespacejust fmt