Codex Windows Desktop: Agent uses stale plugin cache path after plugin update, and session execution details are lost after restart
What version of the Codex App are you using (From “About Codex” dialog)?
26.521.10419
What subscription do you have?
business
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
I am seeing two issues in Codex Windows Desktop related to plugin usage and session diagnostics.
First, after the openai-curated/superpowers plugin was updated, the Agent appeared to use a stale plugin cache path instead of the current plugin path.
In my current Codex workspace, the visible plugin path is:
.codex/plugins/cache/openai-curated/superpowers/6188456f/skills/using-superpowers/SKILL.md
6188456f appears to be the current plugin cache hash on my machine. This path was created/updated around May 23.
However, when I used @superpower in a project conversation, the Agent reported that the superpower plugin was unavailable. When I inspected the plugin path details at that time, the Agent appeared to reference a different cache hash instead of 6188456f.
This suggests that after the plugin update, Codex may not have injected the latest valid plugin path into the Agent environment.
Second, after restarting Codex / reopening the same conversation, the previously visible command/thinking details were no longer available. Only file-edit records and browser-call records remained visible. Because of this, I could no longer recover the exact stale path that the Agent had referenced.
What steps can reproduce the bug?
- Open a project workspace in Codex Windows Desktop.
- Make sure the openai-curated/superpowers plugin exists in the local Codex plugin cache.
- Confirm the current visible plugin path. In my case it was:
.codex/plugins/cache/openai-curated/superpowers/6188456f/skills/using-superpowers/SKILL.md
- In an existing or active project conversation, ask the Agent to use
@superpowerto continue project work. - Observe that the Agent reports the superpower plugin as unavailable.
- Inspect the Agent's plugin path / environment details.
- Compare the path used by the Agent with the current plugin path in the Codex workspace.
- Keep Codex open and observe that more command/thinking details are visible at this point.
- Restart Codex Desktop or reopen the same conversation later.
- Try to inspect the same command/thinking details again.
- Observe that the previous diagnostic details are no longer visible, and only file-edit records and browser-call records remain.
What is the expected behavior?
After a plugin update, Codex should ensure that the Agent receives the current valid plugin cache path.
Expected behavior for plugin loading:
- The Agent should use the latest valid plugin cache path automatically.
- Existing conversations should refresh plugin path injection after the plugin is updated, or Codex should clearly indicate that the conversation/session needs to be restarted.
- The Agent should not silently use or reference a stale plugin cache path that causes the plugin to be reported as unavailable.
- If a plugin cache hash changes, Codex should detect stale paths and re-resolve to the latest valid path.
Expected behavior for session diagnostics:
- After restarting Codex or reopening a conversation, enough diagnostic information should remain available for debugging and bug reporting.
- At minimum, Codex should preserve command execution records, command outputs or summaries, tool calls, plugin paths used by the Agent, and relevant environment/path details.
- If full thinking details are intentionally not persisted, command/tool execution details should still remain available.
Additional information
Environment:
- Product: Codex Windows Desktop
- OS: Windows
- Codex Desktop version: <fill in version>
- Workspace type: Project workspace
- Plugin involved: openai-curated/superpowers
Current visible plugin path:
.codex/plugins/cache/openai-curated/superpowers/6188456f/skills/using-superpowers/SKILL.md
Observed behavior:
- The Agent reported that the superpower plugin was unavailable.
- The Agent appeared to reference a plugin cache path whose hash did not match 6188456f.
- After restarting/reopening Codex, the detailed command/thinking records that showed this path were no longer visible.
- Only file edit records and browser call records remained visible.
Impact:
- The Agent may fail to use an installed/updated plugin because it references an outdated plugin cache path.
- Users cannot easily confirm which plugin version/path the Agent is actually using.
- After restarting Codex or reopening a conversation, diagnostic details may disappear.
- Users lose the evidence needed to file a precise bug report.
- This makes plugin-related failures hard to reproduce, verify, and report.
Questions:
- Does Codex Windows Desktop refresh plugin path injection after a plugin cache update?
- Can existing conversations retain stale plugin cache paths after a plugin update?
- Is it expected that
@superpowercan become unavailable if the Agent has an outdated plugin cache path? - Are command execution details and tool-call details expected to persist after reopening a conversation?
- If full thinking details are not persisted by design, could Codex still preserve the command/tool execution history needed for debugging?
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I hit what looks like the same stale plugin-cache-path failure on macOS in Codex Desktop, and traced a concrete cache-invalidation path in current
main(96f1347fa3504dca512ef11aa97027a5dfcbfc56).Observed local state:
skills_instructionsdeveloper metadata for an active session contained roots like:/Users/claire/.codex/plugins/cache/openai-curated/github/be69e54e/skills/Users/claire/.codex/plugins/cache/openai-curated/superpowers/be69e54e/skillsacdd3141, and the oldbe69e54edirectories no longer existed.Code path I found:
codex-rs/core/src/session/turn_context.rsplugins_manager.plugins_for_config(...)plugin_outcome.effective_plugin_skill_roots()skills_manager.skills_for_config(...)codex-rs/core/src/session/mod.rsbuild_available_skills(...)AvailableSkillsInstructions::from(...)core-skills/src/render.rsrenders concrete plugin-cache paths into the prompt. It recognizes paths underplugins/cache/...and aliases roots like:/Users/.../.codex/plugins/cache/openai-curated/<plugin>/<cache-version>/skillscore-plugins/src/loader.rs::refresh_curated_plugin_cachecore-plugins/src/store.rs::install_with_versioncore-plugins/src/store.rs::remove_old_plugin_versionsPluginsManager::plugins_for_configcachesPluginLoadOutcomeby config TOML version only:core-plugins/src/manager.rslet config_version = version_for_toml(&config.config_layer_stack.effective_config())The cache key does not include the active plugin cache version/path, so the cached
PluginLoadOutcomecan preserve oldeffective_plugin_skill_rootsafter the filesystem cache advances.PluginsManagercache when it refreshes the curated plugin cache:core-plugins/src/manager.rs::start_curated_repo_synccache_refreshed, it callsmanager.clear_cache()Other app-server paths do clear both plugin and skill caches via
spawn_effective_plugins_changed_task, but this curated sync path does not appear to invoke that callback or clearSkillsManager.So this seems broader than Windows: Windows may have an additional
SkillsWatcher/rename failure mode, but stale injected paths can also happen when a curated plugin cache update succeeds and removes the old versioned cache dir while model-visible skill metadata or skill/plugin load outcomes still reference the old concrete path.Possible fixes:
SkillsManageror route through the existingon_effective_plugins_changedcallback that clears both caches.skills_instructions, validate that plugin skill roots still exist; if they do not, force reload plugin and skill outcomes rather than emitting dead cache paths.I found this issue via the duplicate pointer from #25285. The cache-invalidation analysis here matches the failure I reproduced on Windows, so I updated the proposed fix branch to cover both the stale-path compatibility issue and the stale
PluginLoadOutcomecache issue described above.What the branch now does:
.active-versionmarker so retaining old directories does not make active-version selection ambiguous.PluginsManager's cachedPluginLoadOutcomekey, so the manager will not keep returning oldeffective_plugin_skill_rootswhen the active plugin cache version changes under the same config.Local verification on Windows:
just fmtjust test -p codex-core-plugins(191 passed; bench smoke compiled and started)just fix -p codex-core-plugins(passed; reported an existingmanifest.rslarge_enum_variantwarning)I tried to open an upstream PR from the fork branch, but GitHub rejects the create-PR API call for this account/session with
CreatePullRequestpermission errors. The compare link is ready for maintainer review/cherry-pick.Additional handoff artifact for the proposed fix branch: I opened a fork-local mirror PR because GitHub still rejects creating the upstream PR from this account/session.
The mirror PR is draft and only intended as a stable PR-style review/handoff page for the upstream fix.
Update: the fork-local mirror PR is now marked ready for review (no longer draft):
It still targets the same verified commit:
6c2c94daf4026f526465cc4d974348091fb45488.Maintenance update: rebased the handoff branch onto current
openai/codex@mainafter #25318 landed.Fresh verification after rebase:
just fmtjust test -p codex-core-plugins(191 passed; bench smoke compiled and started)just fix -p codex-core-plugins(passed; existingmanifest.rslarge_enum_variantwarning only)Maintenance update: rebased the handoff branch onto current
openai/codex@main(3b7334d099b339e7b18418a0cf7ac34e7bed2e43).Fresh Windows verification after rebase:
just fmtjust test -p codex-core-plugins(191 passed; bench smoke compiled and started)just fix -p codex-core-plugins(passed; existingcore-plugins/src/manifest.rslarge_enum_variantwarning only)I retried creating the upstream PR, but GitHub still rejects this account/session with
CreatePullRequestpermission errors.Maintenance update: rebased the handoff branch onto current
openai/codex@main(9756316d89968945212cd5f958b2b972c77c9e09) after upstream touchedcore-plugins/src/manager_tests.rs.Fresh Windows verification after rebase:
just fmtjust test -p codex-core-plugins(192 passed; bench smoke compiled and started)just fix -p codex-core-plugins(passed; existingcore-plugins/src/manifest.rslarge_enum_variantwarning only)I retried creating the upstream PR, but GitHub still rejects this account/session with
CreatePullRequestpermission errors.