fix(codex): install local plugin cache during setup#3066
Conversation
Greptile SummaryThis PR updates Codex setup so the local plugin cache is installed during
Confidence Score: 5/5The changes are focused on Codex setup behavior and are covered by targeted installer and runtime tests. No issues were identified in the reviewed changes, and the described verification includes relevant non-interactive install, integration, typecheck, and build coverage.
What T-Rex did
Reviews (2): Last reviewed commit: "fix(codex): fail when plugin cache insta..." | Re-trigger Greptile |
|
@Retengart — #3095 overlaps this directly on the Codex path: same Confirmed our staged code didn't write #3095 is otherwise a superset on this path (it adds tree-sitter runtime provisioning). Rather than duplicate your work, I'd rather rebase onto #3066 or fold it in with co-authorship — your call. And I'd value your read on whether the marketplace-fallback resolution path also needs a marker, or if the cache-dir write covers the resolutions you were seeing. |
|
Follow-up: I tested #3095 end-to-end after a fresh local install. The installer wrote |
|
@rymalia Thanks for checking the Codex path end to end. I am fine with folding #3066 into #3095 with credit/co-authorship if maintainers prefer #3095 as the superset path. The important parts from my side are:
Your cache-after-provisioning placement looks sufficient for the native Codex install path based on the fresh-session verification you posted. I would keep the marketplace-root marker as a defensive fallback concern, not a blocker for #3095. I also prepared a |
Summary
codex plugin add claude-mem@claude-mem-localafter registering the local marketplace.install-versioninto the bundled marketplace plugin root before Codex installs from itRoot cause
On current Codex CLI,
codex plugin marketplace upgrade claude-mem-localis only valid for Git marketplaces. For a local marketplace it fails with:The installer ran that command best-effort, so installs could still report Codex marketplace registration success while
codex plugin listshowedclaude-mem@claude-mem-localasnot installedand no active Codex plugin cache existed.A second related gap is that Codex installs by copying from the bundled marketplace plugin root. That root did not receive
.install-version, so a freshly installed Codex cache could inherit a missing marker and hit theruntime not yet set upSessionStart path even though runtime setup had completed elsewhere.Related older report: #2361.
Verification
codex plugin liststill showednot installeduntilcodex plugin add claude-mem@claude-mem-localwas run.codex plugin listshowsinstalled, enabled; worker readiness returns ready; direct Codex hook replay returns accepted JSON forSessionStart,PreToolUse, andPostToolUsewith nosuppressOutputon tool hooks.bun test tests/install-non-tty.test.ts tests/integration/codex-cli-installer.test.ts tests/setup-runtime.test.ts tests/services/integrations/spawn-contract-windows.test.tsnpm run typecheck:rootnpm run build