Skip to content

codex plugin list reports installed, enabled for a plugin whose plugins/cache payload is missing, and the model sees none of its skills #34321

Open

Description

@konard

Summary

codex plugin list reports a plugin as installed, enabled (and --json
returns "installed": true, "enabled": true) when the plugin's payload under
$CODEX_HOME/plugins/cache/<marketplace>/<plugin>/<version>/ has lost its
skills/ subtree. In that state the plugin contributes zero skills to
<skills_instructions>, so a model is told nothing about skills the operator
believes are installed, and any automation gated on plugin list skips the one
command that would fix it.

Enablement (config.toml) and exposure (the materialized payload) are tracked
independently and never reconciled, and there is no codex plugin doctor /
verify / --repair to ask about the second one.

Observed with codex 0.144.6 on Linux.

Reproduction

export CODEX_HOME=$(mktemp -d)

# any marketplace works; this uses a renamed copy of the curated catalogue
git clone -q --depth 1 https://github.com/openai/plugins.git /tmp/plugins-src
cp -r /tmp/plugins-src /tmp/mkt && rm -rf /tmp/mkt/.git
python3 - <<'PY'
import json
p = "/tmp/mkt/.agents/plugins/marketplace.json"
m = json.load(open(p)); m["name"] = "repro"
m["plugins"] = [x for x in m["plugins"] if x["name"] == "superpowers"]
json.dump(m, open(p, "w"), indent=2)
PY

codex plugin marketplace add /tmp/mkt --json > /dev/null
codex plugin add superpowers@repro --json > /dev/null

codex debug prompt-input probe | grep -c 'superpowers:'      # => 14

# Remove ONLY the skills/ subtree; the version directory and config.toml survive.
find "$CODEX_HOME/plugins/cache/repro/superpowers" -maxdepth 2 -name skills -type d -exec rm -rf {} +

codex plugin list | grep superpowers
#   superpowers@repro   installed, enabled   <version>   ...
codex plugin list --json | python3 -c 'import json,sys; print([ (p["pluginId"], p["installed"], p["enabled"]) for p in json.load(sys.stdin)["installed"] ])'
#   [('superpowers@repro', True, True)]

codex debug prompt-input probe | grep -c 'superpowers:'      # => 0

Installed, enabled, and invisible — simultaneously.

The same thing happens when the whole plugins/cache/<marketplace>/<plugin>
directory is removed while config.toml keeps its [plugins."…"] block, which
is how we hit it in practice (a persistent per-repository CODEX_HOME whose
cache did not survive a container rebuild).

Impact

We provision a repository-scoped CODEX_HOME before starting codex exec. The
provisioning step used plugin list to decide whether an install was needed, so
in this state it skipped plugin add, launched the session, and the model
correctly refused the task because the mandated skills were not in its prompt.
The failure is silent from the CLI's point of view: every command exits 0 and
every status field says healthy.

It is also not self-correcting from inside a session — a codex plugin add run
by the model after the session started does not retroactively add the skills to
the already-rendered prompt.

Workaround

Do not trust plugin list for this question. Stat the payload directly, and
verify against the rendered prompt:

ls "$CODEX_HOME/plugins/cache/<marketplace>/<plugin>"/*/skills/*/SKILL.md
codex debug prompt-input probe | grep -o '<plugin>:[a-z-]*' | sort -u

codex plugin add <id> repairs both a missing and a gutted payload and is
idempotent, so it is safe to run unconditionally.

Suggested fixes (any one would be sufficient for us)

  1. Make plugin list stat the payload: report installed only when the
    version directory referenced by the config entry actually exists (and,
    ideally, report enabled, payload missing rather than installed, enabled).
  2. Reconcile on load: when a plugin is enabled in config.toml but its cached
    payload is absent, re-materialize it from the configured marketplace instead
    of rendering a session without it.
  3. Add a codex plugin doctor (or plugin list --verify) that reports
    payload-vs-config divergence and can repair it, so automation has a
    supported command to call.

Related but distinct: #31365 (payload present, config entry lost — the mirror
image), #21138 (payload stale because refresh compares only the version string),
#29103 (marketplace source not persisted).

Activity

  1. added
    bug
    CLI
    skills
    on Jul 20, 2026
  2. builtbyhuy commented on Aug 10, 2026

    @builtbyhuy

    Confirmed this is still reproducible on the current stable codex-cli 0.147.0 on macOS 26.5 arm64.

    I reran the original scenario with isolated temporary HOME, CODEX_HOME, XDG directories, and a local shallow clone of openai/plugins; no model, API call, or personal Codex state was involved.

    Observed sequence:

    before payload removal:
      plugin list --json: installed=true, enabled=true, version=5.1.3
      debug prompt-input count for superpowers: 1
    
    after moving only cache/.../5.1.3/skills out of the payload:
      plugin list --json: installed=true, enabled=true, version=5.1.3
      debug prompt-input count for superpowers: 0
    

    So this now has cross-version evidence from 0.144.6 to 0.147.0 and reproduces outside Linux. I am inspecting the current loader/list reconciliation path for a focused regression test and minimal fix; I will link a PR here if that remains unaddressed on main.

  3. builtbyhuy commented on Aug 10, 2026

    @builtbyhuy

    I traced the mismatch to PluginStore::is_installed: it currently answers whether an active version directory exists, while skill discovery separately requires the declared legacy skill paths to still exist. That lets list state remain installed: true after only the cached skills/ subtree is removed.

    A focused fix is ready on builtbyhuy:fix/plugin-list-payload-validation at 535a454. The approach preserves the existing directory-presence meaning of is_installed for remote metadata/script attribution, adds a payload predicate only for plugin-list reconciliation, checks explicitly declared legacy skill paths, and keeps Agent Plugin conventional optional roots valid.

    Regression coverage includes:

    • CLI E2E: install, remove only cached skills/, observe installed: false while enabled: true, then reinstall and confirm repair
    • legacy manifests that declare a direct skill file
    • Agent Plugin manifests with no optional skills/ directory

    Observed locally: core-plugins 390/390, CLI 351/351, plus just fix for both crates and just fmt.

    Per the invitation-only contribution policy, I have not opened an unsolicited PR. If this approach matches the intended fix and a maintainer would like a PR, I can submit the prepared branch.

  4. HolisticCrew commented on Oct 31, 2026

    @HolisticCrew

    Additional macOS observation on 2026-10-31, related but not identical to the original report.

    The task's skill catalog advertised browser:control-in-app-browser with this documentation target:

    <CODEX_HOME>/plugins/cache/openai-bundled/browser/26.1027.30824/skills/control-in-app-browser/SKILL.md

    Reading that exact target returned ENOENT. A bounded filename search of the cache returned no matching skill path; this was not an exhaustive filesystem audit.

    An existing regular copy was found under the bundled marketplace source, with a browser manifest declaring the same version (26.1027.30824) and skills: "./skills/". No cache/source modification, installation, download, or configuration change was performed.

    After reading the existing bundled instructions, one documented in-app browser setup attempt returned:

    Local browser use is disabled in Work settings

    That policy denial was respected. It is not being reported as a bug, and no alternate browser or security-setting change was attempted. The missing advertised documentation path and the Work-settings denial are separate observations.

    Installed/enabled CLI state and desktop build: NOT_COLLECTED. The root cause of the missing catalog target is not established. A shared root cause with this issue has not been established; this is an additional catalog-reference observation.

    Expected behavior: skill catalog references should be readable or explicitly unavailable, and a disabled capability should be distinguished from missing documentation.

    No private page content, real user paths, credentials, host logs, or attachments are included.

  5. TheOutlandsDev commented on Nov 5, 2026

    @TheOutlandsDev

    Confirmed with a synthetic local marketplace on Linux x86_64 using a locally built Codex CLI binary that identifies as codex-cli 0.166.0 (SHA-256 d68e6ad1a071bf25cc93c81ee06b4147859b4f3e8a27e9ca2a87b4b287a1be78).

    In a fresh, credential-free CODEX_HOME, I installed one local plugin containing one synthetic skill. Before removing its cached skills/ directory, codex plugin list --json returned installed: true, enabled: true, version: 1.0.0, and codex debug prompt-input included the synthetic skill marker. After removing only that cached skills/ directory, the list fields were unchanged, while the marker was absent from the rendered prompt. Marketplace add, plugin add, both list calls, and both prompt-input calls all exited 0.

    This confirms the list/prompt mismatch on a newer x86_64 build. The test used a local build and fixture, so it does not independently establish behavior of an official packaged 0.166.0 release. No model request or account credentials were used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions