Repository navigation
fix(codex): keep plugin loaded for explicit multi-agent gateways - #124172
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 15, 2026, 9:01 AM ET / 13:01 UTC. ClawSweeper reviewWhat this changesThe PR defers Codex session-catalog agent binding until each paired-node request so explicit multi-agent gateways do not fail during plugin registration. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Blocked by patch quality or review findings - 8 items remain Keep open: the earlier P1 remains. This PR sends Priority: P1 Review scores
Verification
How this fits togetherThe bundled Codex plugin registers catalog commands with a Gateway, which then asks paired nodes to list, read, continue, or resume Codex sessions. The selected agent determines the Codex home used by each node-side command. flowchart LR
A[Gateway catalog request] --> B[Selected agent]
B --> C[Paired-node command selection]
C --> D[Node command handler]
D --> E[Codex App Server]
E --> F[Sessions and terminal resume]
Decision needed
Why: That upgrade policy determines whether this change needs an additive node protocol/capability or an intentional incompatibility boundary, and repository policy requires owner confirmation for protocol-version direction. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +44, Tests +117. Total +161 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep request-bound catalog control, but introduce an agent-aware paired-node command/capability and route explicit-owner requests only to compatible nodes; add a mixed-version Gateway/node regression before merge. Do we have a high-confidence way to reproduce the issue? Yes, from source: register the plugin with explicit multi-agent ownership to exercise the current eager binding, then run an upgraded Gateway against a node advertising only the old v1 command to observe the unsupported Is this the best way to solve the issue? No: deferring ownership is the right boundary, but reusing a strict v1 node payload is not safe until the Gateway can negotiate an agent-aware command or clearly reject incompatible nodes. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against cc9883a3d33b. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
1d32ba8 to
d1c0204
Compare
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where Gateways with multiple explicitly owned agents lost the bundled Codex plugin during startup. The Gateway remained generally healthy, but Codex session catalogs, harness turns, tools, hosted search, and media support were all absent because plugin registration threw
AgentSelectionRequiredErrorbefore any request owner existed.Regression provenance: #123899 added the eager bind in squash merge
632581477f042de83bfdc095b9fdb042330deb72. Line blame attributes it to WhatsSkiLL (PR author @IWhatsskill); the PR was merged by @steipete on 2026-08-15.Why This Change Was Made
Codex registration is now owner-neutral. The already-authorized catalog request carries its agent ID through every paired-node list, transcript, continuation, eligibility, history, and terminal-resume hop; the node binds
CodexSessionCatalogControlFactory.forRequest(agentId)only when handling that request. Missing owners still fail closed for explicit multi-agent configurations, and config reloads cannot retain a startup-selected owner.This is the owning boundary because Codex App Server has no OpenClaw-agent field: it resolves one
CODEX_HOMEat process startup and keeps one process-scoped thread store. Upstream source:find_codex_home, process-scoped thread store, andthread/liststore dispatch.Production LOC: +66/-22 (net +44) | Tests: +133/-16. The production growth is the explicit ownership handoff across the five paired-node operation families; it replaces the invalid single registration-time owner with one canonical request-bound flow.
User Impact
Operators can run Codex on explicit multi-agent Gateways without losing the plugin at startup. Paired-node catalogs and terminals now use the selected agent's Codex home instead of an ambient default. Release-note context: fix Codex plugin startup and paired-node ownership for explicit multi-agent configurations.
Evidence
Immutable built-output A/B reproduction with the same explicit three-agent config:
Focused regression proof:
pnpm test extensions/codex/index.test.ts extensions/codex/src/session-catalog.test.ts— 138/138 passed. It covers explicit registration with the catalog enabled and disabled, sole-to-explicit config reload, beta-only control selection, missing-owner rejection, betaCODEX_HOME, and alpha/beta paired-node continuation isolation.Changed gate:
pnpm check:changed— all selected formatting, guards, plugin boundaries, typechecks, lints, dead-export, database-first, and import-cycle checks passed on Blacksmith Testbox run 31884284652.Structured autoreview: clean, with no accepted/actionable findings.
git diff --check: clean.