Problem
scripts/install-codex.sh --user currently writes Codex's private marketplace cache layout itself and then appends enabled plugin entries to ~/.codex/config.toml.
On Codex CLI 0.144.6, the supported installer publishes versioned roots through codex plugin add. The manual flow can expose an enabled plugin before the corresponding cache root is ready. On a first session after installation, both SessionStart and Stop from go-workflow@gopher-ai failed with exit code 127. The cache/config timestamps matched the session start, while a subsequent clean session succeeded.
The prior 1.7.1 active-root preservation fix prevents deleting an already-loaded root, but it still relies on Codex's private cache/config implementation and does not close this first-install race.
Proposed change
- Require a Codex version that supports
codex plugin add.
- Register or upgrade the gopher-ai marketplace.
- Install each Codex-capable plugin with
codex plugin add <plugin>@gopher-ai.
- Stop hand-writing cache roots and plugin enablement entries.
- Make
--prune-cache retain the current versioned root rather than a commit-hash root.
- Update installer output and documentation to describe the public CLI flow.
- Ship as a patch release so fleet machines can rerun the universal installer.
Acceptance criteria
--user invokes codex plugin add for all six Codex plugins.
- The installer does not manually append
[plugins.*] enabled = true entries.
- A clean first Codex session reports no SessionStart or Stop hook exit-127 errors.
- Reinstalling the same version does not invalidate an active plugin root.
- Publishing a new version retains the prior root until explicit post-session pruning.
- Existing installation, hook, and shared-sync tests pass.
Local implementation
A validated implementation is currently prepared on local branch fix/codex-plugin-cli-install.
Problem
scripts/install-codex.sh --usercurrently writes Codex's private marketplace cache layout itself and then appends enabled plugin entries to~/.codex/config.toml.On Codex CLI 0.144.6, the supported installer publishes versioned roots through
codex plugin add. The manual flow can expose an enabled plugin before the corresponding cache root is ready. On a first session after installation, bothSessionStartandStopfromgo-workflow@gopher-aifailed with exit code 127. The cache/config timestamps matched the session start, while a subsequent clean session succeeded.The prior 1.7.1 active-root preservation fix prevents deleting an already-loaded root, but it still relies on Codex's private cache/config implementation and does not close this first-install race.
Proposed change
codex plugin add.codex plugin add <plugin>@gopher-ai.--prune-cacheretain the current versioned root rather than a commit-hash root.Acceptance criteria
--userinvokescodex plugin addfor all six Codex plugins.[plugins.*] enabled = trueentries.Local implementation
A validated implementation is currently prepared on local branch
fix/codex-plugin-cli-install.