Repository navigation
fix(codex): managed turns use the bundled app-server version - #124124
fuller-stack-dev merged 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 5:07 AM ET / 09:07 UTC. ClawSweeper reviewWhat this changesThe PR records the Codex plugin root from the plugin loader and prefers that package’s managed app-server binary over a stale hoisted binary. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer handling: the patch targets a source-proven packaged-layout defect, but the mandatory direct sibling Codex source check is unavailable in this read-only environment and the PR is maintainer-labeled. Priority: P1 Review scores
Verification
How this fits togetherThe Codex plugin starts a managed app-server for agent turns. The plugin loader supplies the installed package root, which the binary resolver turns into the executable selected for startup and fallback. flowchart LR
A[Plugin loader] --> B[Plugin package root]
B --> C[Managed binary resolver]
D[Explicit command override] --> C
C --> E[Ordered executable paths]
E --> F[Codex app-server]
F --> G[Agent turn]
Decision needed
Why: Repository policy requires the acting reviewer to inspect the exact Codex source for dependency-backed app-server behavior, which this read-only environment cannot provide. Before merge
Agent review detailsSecurityNone. PR surfaceSource -13, Tests +47. Total +34 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the loader-provided package root as the canonical selection input, retain explicit overrides and managed fallbacks, and complete the direct Codex contract check against the exact PR head. Do we have a high-confidence way to reproduce the issue? Yes, from source: a packaged plugin root with both a local and hoisted launcher makes current main search from the inferred module root, while the new focused fixture captures the corrected precedence. This review did not execute the fixture because repository review is read-only. Is this the best way to solve the issue? Unclear: using the loader’s authoritative package root is the clean owner-boundary repair rather than reconstructing distribution paths in the resolver, but the required direct Codex dependency check remains unavailable. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 160e368a8902. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer dependency gate completed for exact head I directly inspected OpenAI Codex tag
This matches the resolver contract: select the owning plugin package launcher first, then let that launcher select its own native package. The linked packaged Testbox proof initialized the extension-local Canonical main movement since the PR base ( |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where ordinary Codex turns could fail their app-server version handshake in packaged installs that contained both the Codex plugin's current pinned binary and an older hoisted
@openai/codexbinary. The managed resolver selected the stale hoisted command first.Why This Change Was Made
The Codex plugin now records the authoritative
rootDirsupplied by OpenClaw's plugin loader and resolves managed binaries from that owning package first. Existing ancestor/package fallbacks remain intact, so missing owner-local binaries still fall through safely; explicit command overrides and macOS desktop-first Computer Use ordering are unchanged.This keeps bundle-layout policy in plugin discovery instead of reconstructing
dist/extensionspaths inside the resolver. It restores the ownership contract established by #71808, which assigned the managed app-server version to the Codex plugin.User Impact
Packaged, upgraded, and fresh installs with mixed Codex dependency versions now start the extension-pinned app-server for ordinary managed turns instead of failing because an unrelated hoisted version is stale. Source installs, separately installed plugins, macOS desktop-first Computer Use, Linux, Windows, explicit overrides, and managed fallback behavior remain compatible.
Release note: Fixed packaged Codex managed turns selecting a stale hoisted app-server binary instead of the bundled plugin's pinned version.
Evidence
codex.cmdpaths.tbx_01m029b7p6eh5t71bak0zxtdtbselecteddist/extensions/codex/node_modules/.bin/codex, reportedcodex-cli 0.147.0, completed initialize as 0.147.0, and never started the stale hoisted launcher. Runtbx_01m02a395r2vy4bk3fgf57wpw9. Run