plans/2026-05-06-codex-plugin-version-mismatch.md
Date: 2026-05-06
Codex is still exposing claude-mem from:
/Users/alexnewman/.codex/plugins/cache/thedotmack/claude-mem/12.3.1
That cache entry is the source of the claude-mem:... skills loaded in this Codex session. The working tree and the Codex marketplace clone both advertise 12.7.2, but the enabled Codex plugin points at the old installed cache. This is not a model-memory issue.
The likely root cause is an incomplete migration from marketplace registration to a first-class Codex plugin install. The current installer registers the marketplace, but it does not verify that the actual enabled plugin cache was installed or upgraded to the current .codex-plugin bundle.
Current repository metadata is 12.7.2:
package.json.codex-plugin/plugin.jsonplugin/.codex-plugin/plugin.jsonplugin/package.jsonCodex marketplace source is current:
/Users/alexnewman/.codex/config.toml contains [marketplaces.claude-mem-local]last_updated = "2026-05-06T23:13:59Z"last_revision = "bb3dbfdb5ae92b55b7e4686e4904995184261232"/Users/alexnewman/.codex/.tmp/marketplaces/claude-mem-local/package.json is 12.7.2/Users/alexnewman/.codex/.tmp/marketplaces/claude-mem-local/.codex-plugin/plugin.json is 12.7.2Active enabled plugin state is still old:
/Users/alexnewman/.codex/config.toml contains [plugins."claude-mem@thedotmack"] enabled = trueclaude-mem plugin cache under ~/.codex/plugins/cache/thedotmack/claude-mem is 12.3.1/Users/alexnewman/.codex/plugins/cache/thedotmack/claude-mem/12.3.1/package.json is 12.3.1/Users/alexnewman/.codex/plugins/cache/thedotmack/claude-mem/12.3.1/.install-version records {"version":"12.3.1", ...}The active cache is not shaped like the new first-class Codex bundle:
.claude-plugin/plugin.json.codex-plugin/plugin.jsonhooks/codex-hooks.json.mcp.json still uses the old bun command with "${CLAUDE_PLUGIN_ROOT}/scripts/mcp-server.cjs"Current Codex CLI capability is limited:
codex-cli 0.128.0codex plugin marketplace exposes add, upgrade, and removeplugin list or plugin install subcommand in this buildCurrent installer code only registers a marketplace:
src/services/integrations/CodexCliInstaller.ts:188 prints the marketplace rootsrc/services/integrations/CodexCliInstaller.ts:189 runs codex plugin marketplace add <root>src/services/integrations/CodexCliInstaller.ts:200 through src/services/integrations/CodexCliInstaller.ts:203 tells the user to open /plugins and install manuallysrc/npx-cli/commands/install.ts:271 through src/npx-cli/commands/install.ts:281 reports success as "hooks marketplace registered", not "plugin installed"There are two independent states:
claude-mem-local.claude-mem@thedotmack.Codex loads skills, hooks, and MCP metadata from the installed plugin cache, not directly from the marketplace source. Since the installed cache is still 12.3.1, every new Codex session sees claude-mem as 12.3.1, even though the marketplace clone is already at 12.7.2.
The claude-mem@thedotmack plugin ID also suggests this cache came from an older GitHub marketplace install path, while the current installer registers claude-mem-local. That mismatch needs to be handled explicitly during repair and install.
What to do:
Capture a clean before-state snapshot:
codex --versionsed -n '1,220p' ~/.codex/config.tomlfind ~/.codex/plugins/cache -maxdepth 5 -type f \( -name 'plugin.json' -o -name 'package.json' -o -name '.mcp.json' -o -name 'codex-hooks.json' \) -printfind ~/.codex/plugins/cache/thedotmack/claude-mem -maxdepth 2 -type d -printConfirm which paths Codex injects into the session skill list:
claude-mem: paths.~/.codex/plugins/cache/thedotmack/claude-mem/12.3.1/skills.Verification:
12.3.1 before remediation.Anti-pattern guards:
~/.codex/plugins/cache blindly.~/.codex/config.toml project trust settings.codex plugin marketplace upgrade upgrades the installed plugin cache until verified.What to do:
Back up the current Codex plugin state:
cp ~/.codex/config.toml ~/.codex/config.toml.bak-$(date +%Y%m%d-%H%M%S)~/.codex/plugins/cache/thedotmack/claude-mem/12.3.1Remove the stale enabled plugin state through supported UI where possible:
/plugins.claude-mem@thedotmack if it appears.Register or refresh the current marketplace:
codex plugin marketplace upgrade claude-mem-localInstall claude-mem from the claude-mem (local) marketplace in /plugins.
Restart Codex.
Verification:
~/.codex/plugins/cache contains a claude-mem cache with .codex-plugin/plugin.json.version: 12.7.2.hooks/codex-hooks.json..mcp.json uses the portable sh -c wrapper from the current repo.claude-mem: skills from the new cache, not 12.3.1.Anti-pattern guards:
~/.codex/plugins/cache as the primary fix. Use it only as a diagnostic fallback.claude-mem@thedotmack and a new local claude-mem enabled if Codex treats them as distinct plugins.What to implement:
claude-mem plugin is already present./plugins action required.0.128.0, keep the /plugins step but verify and report the gap.Code references:
src/services/integrations/CodexCliInstaller.ts:10 for MARKETPLACE_NAME.src/services/integrations/CodexCliInstaller.ts:12 through src/services/integrations/CodexCliInstaller.ts:16 for required marketplace files.src/services/integrations/CodexCliInstaller.ts:175 through src/services/integrations/CodexCliInstaller.ts:214 for install flow.src/npx-cli/commands/install.ts:269 through src/npx-cli/commands/install.ts:282 for task status text.tests/install-non-tty.test.ts for existing installer behavior assertions.Suggested implementation details:
Add a diagnoseCodexPluginState() helper that reads:
~/.codex/config.toml~/.codex/plugins/cache/**/claude-mem/**/.codex-plugin/plugin.json~/.codex/plugins/cache/**/claude-mem/**/.claude-plugin/plugin.json~/.codex/plugins/cache/**/claude-mem/**/.install-versionClassify state as:
not_installedinstalled_current_codexinstalled_stale_codexinstalled_legacy_claude_shapeduplicate_installsInclude current repo/package version in the expected state.
Treat installed_legacy_claude_shape as a warning or failure for Codex integration, because it is the exact observed bad state.
Verification:
12.3.1 legacy cache with .claude-plugin only.12.7.2 first-class cache with .codex-plugin.Anti-pattern guards:
12.7.2; read expected version from package metadata.~/.codex/.tmp/marketplaces/... as proof of plugin installation.What to implement:
npx claude-mem repair --ide codex-cli or equivalent repair flow to handle Codex first-class plugin state.claude-mem@thedotmack./plugins installation is still required./plugins.Code references:
src/npx-cli/commands/install.ts for marketplace copy and IDE task orchestration.src/services/integrations/CodexCliInstaller.ts for Codex-specific registration.src/npx-cli/commands/uninstall.ts for uninstall symmetry.Verification:
12.3.1 legacy cache reports the correct stale-cache diagnosis.Anti-pattern guards:
What to update:
Document that Codex currently has two steps:
npx claude-mem install./plugins.Add troubleshooting for this exact mismatch:
~/.codex/plugins/cache/thedotmack/claude-mem/12.3.1.claude-mem@thedotmack, install from claude-mem (local), restart Codex.Code/doc references:
docs/public/installation.mdxdocs/public/troubleshooting.mdxREADME.mdVerification:
codex plugin marketplace add alone installs the plugin.Manual verification checklist:
12.3.1 cache.claude-mem@thedotmack and local claude-mem.Acceptance criteria:
claude-mem: skills from a current cache path..codex-plugin/plugin.json..codex-plugin/plugin.json..mcp.json wrapper./plugins UI use marketplace name, repository owner, or plugin author to derive the installed plugin cache namespace?codex plugin marketplace upgrade claude-mem-local intentionally avoid updating already-installed plugin caches?/plugins step?claude-mem@thedotmack when installing claude-mem-local, or should it only warn?