fix(codex): accept first-party OpenAI plugin marketplaces (bundled and primary-runtime)#82219
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 31, 2026, 5:50 AM ET / 09:50 UTC. Summary PR surface: Source +99, Tests +206, Docs +15. Total +320 across 23 files. Reproducibility: yes. from source inspection: current main's schema and resolver only accept Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a narrow Codex marketplace fix after maintainers define Computer Use precedence/migration and live proof shows representative bundled and primary-runtime plugins invoked through OpenClaw; split unrelated gate repairs if they are not intentional scope. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main's schema and resolver only accept Is this the best way to solve the issue? No: the allowlist direction is plausible, but accepting all bundled plugins before defining Computer Use precedence and proving live plugin invocation is not the narrowest safe merge state. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 724160b7ebef. Label changesLabel justifications:
Evidence reviewedPR surface: Source +99, Tests +206, Docs +15. Total +320 across 23 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
9c01782 to
b4f5a8e
Compare
b4f5a8e to
219eb79
Compare
219eb79 to
b5c1922
Compare
|
before we can merge we need to check whether the other marketplace plugins will work properly in openclaw (eg. invoking google chrome extension or documents extension). also note that the computer use plugin is currently a seperate feature driven by seperate configuration inside of openclaw. this should be merged into plugins but i would like there to be more thought on how we should handle conflict with native openclaw computer use as well as migration from existing configuration |
|
Thanks for the read, Kevin. Before I build anything, want to surface a couple things to make sure I'm building the right shape. On scope, I'm weighing three options:
I'm leaning toward the second since the schema widening is the enabler for the unification, but happy to follow your preference. On precedence and migration, once you pick a scope I'd value your read on how legacy codex-computer-use should coexist with the new codexPlugins.plugins.computer-use. Options im considering are new path wins with doctor warning on legacy, hard error if both present, legacy wins with a deprecation timeline, or something else. Relatedly, whether migration/apply.ts should silently lift legacy config into the new shape on next update or surface the migration as an explicit user step. Let me know which shape lands best and I'll do the work. |
chat surface - /codex (no-arg) returns a 2x2 button picker (plugins / permissions / account / help) - /codex fast menu, /codex permissions menu, /codex computer-use menu open sub-pickers - Telegram callback handler dispatches cdx_* callback_data to a new picker library at extensions/telegram/src/codex-picker-buttons.ts; navigation buttons editMessage in place, leaf actions stay on the existing tgcmd: synthesis path so they fire as real chat commands and pass through mainline's canMutateCodexPlugins auth gate from openclaw#83293. - No new plugin verbs beyond canonical list / enable / disable; toggle / remove / add are intentionally not picker-exposed (per maintainer guidance on the prior shape of openclaw#82224). - Rebased on top of openclaw#83293 (mainline list/enable/disable). openclaw#82219 marketplace work is excluded from this PR. Closes openclaw#82218 Related openclaw#82219, openclaw#83293
a6e19da to
468ba4f
Compare
468ba4f to
fbb88c0
Compare
052c504 to
f5be04e
Compare
…undled, primary-runtime)
# Conflicts: # extensions/sms/src/channel.test.ts # extensions/sms/src/channel.ts # src/gateway/server.agent.gateway-server-agent-b.test.ts # Conflicts: # extensions/sms/src/channel.ts
|
Behavior addressed: Real environment tested: Exact steps or command run after this patch: Evidence after fix: Observed result after fix: What was not tested: |
Summary
marketplaceNameis notopenai-curated(sochrome,browser,computer-usefromopenai-bundled, plusdocuments,spreadsheets,presentationsfromopenai-primary-runtime) is silently rejected by the Codex plugin config schema. The plugin disappears frompluginPoliciesand never reaches the Codex app-server.openclaw.json, which means computer-use, chrome, documents, spreadsheets and presentations are effectively invisible to Openclaw. Migration duringopenclaw updatedrops them too, so each upgrade quietly truncates the picture.CODEX_PLUGINS_MARKETPLACE_NAME = "openai-curated"with an allowlist arrayCODEX_PLUGINS_MARKETPLACE_NAMEScovering all three first-party marketplaces, widened the schema enum inextensions/codex/openclaw.plugin.jsonto match, and updated every downstream resolver to iterate the allowlist (plugin-activation.ts,plugin-inventory.ts,session-binding.ts,migration/apply.ts). A follow-up fix replaces the hardcoded curated reference inensureCodexPluginActivation's missing-marketplace check withparams.identity.marketplaceName, which is the semantically correct check once any of the three marketplaces can appear in an identity.Change Type
Scope
Linked Issue/PR
Real behavior proof
Behavior or issue addressed: Adding a Codex sub-plugin from
openai-bundledoropenai-primary-runtimeis silently rejected by the Codex plugin config schema, even though both are first-party OpenAI marketplaces. After this patch, all three marketplaces resolve and the plugin reaches the Codex app-server normally.Real environment tested: macOS 15.4 Apple Silicon, Openclaw 2026.5.12 managed install at
/opt/homebrew/lib/node_modules/openclaw,@openclaw/codexplugin enabled, Mac Gateway running underopenclaw gateway. Codex CLI installed locally with all three OpenAI marketplaces registered, confirmed viacodex plugin marketplace listshowingopenai-curated,openai-bundled,openai-primary-runtime.Exact steps or command run after this patch:
pnpm build.~/.openclaw/openclaw.jsonto add three plugins, one per marketplace:openclaw restart.pnpm test extensions/codexfor narrow proof.pnpm tsgo:extensionsandnpx oxfmt --check extensions/codexfor type and format proof.Evidence after fix (terminal capture, copied live output):
Targeted unit tests pass, including the three new tests this PR adds:
Three new tests locked in by this PR:
app-server/config.test.ts: "accepts native plugin identities from every first-party OpenAI marketplace" verifies all three marketplaces resolve topluginPolicies[]entries.app-server/plugin-activation.test.ts: bundled and primary-runtime plugins are activated alongside curated.app-server/session-binding.test.ts: session binding accepts the wider allowlist.After gateway restart with all three entries in
openclaw.json, the resolved policy shows all three:Gateway startup no longer prints the schema-rejection warning for
chromeordocuments.pnpm tsgo:extensionsandnpx oxfmt --checkboth clean on the touched files.Observed result after fix:
chrome(fromopenai-bundled) anddocuments(fromopenai-primary-runtime) appear in the resolved Codex plugin policy alongsidegoogle-calendar(fromopenai-curated). The Codex app-server picks all three up on the next session. No restart loop, no schema warnings, no config-repair prompts fromopenclaw doctor.What was not tested: I did not exercise the bundled or primary-runtime plugins end-to-end (
chrome.navigate,documents.create, etc). This patch only changes the allowlist, so runtime behavior of each plugin is unchanged once admitted. Codex itself owns the plugin runtime. I also did not run the full repo suite locally; narrow proof scoped toextensions/codex. The full gate runs in CI on push. Not tested on Windows or Linux. The change is platform-agnostic JSON-schema validation, so platform risk is minimal. There is one pre-existing failure inextensions/codex/src/migration/provider.test.ts > leaves selected Codex plugins as warnings when target curated plugins never loadthat also fails on plainupstream/main(expectedplugin_missing, gotmarketplace_missing); confirmed reproducible on plain main, not introduced by this PR.Before evidence: with the same
openclaw.jsononupstream/main, the same gateway-status dump shows onlygoogle-calendarresolved.chromeanddocumentsare silently dropped during config resolution.migration/apply.tsstrips them again on everyopenclaw update.Root Cause
openai-curatedexisted as a public OpenAI Codex marketplace, so the allowed-marketplace identifier was coded as a singleconst string(CODEX_PLUGINS_MARKETPLACE_NAME). OpenAI has since shipped two more first-party marketplaces (openai-bundledfor Codex.app's local catalog,openai-primary-runtimefor the Codex primary runtime), but the Openclaw side was never widened to match. Schema validation rejects anything that does not equal the single allowed string. The follow-up fix inensureCodexPluginActivationaddresses a corner case in the same area: when activation fails to resolve a plugin, the missing-marketplace check was still comparing against the hardcoded curated constant, which is no longer semantically correct now that three marketplaces are valid.openclaw.jsondrift apart.Regression Test Plan
extensions/codex/src/app-server/config.test.ts, alongsideplugin-activation.test.tsandsession-binding.test.ts.marketplaceName: "openai-bundled"resolves to a normalpluginPolicies[]entry, not a dropped row.openai-primary-runtime.openai-curated(regression guard, so the test fails if the allowlist is accidentally narrowed back to a single value).User-visible / Behavior Changes
Operators who add a Codex sub-plugin from
openai-bundledoropenai-primary-runtimeto~/.openclaw/openclaw.jsonnow get a working entry instead of a silently dropped one.openai-curatedplugins behave byte-identically. No defaults change. No public config key is added or removed.Diagram
Security Impact
Yes, explain risk + mitigation: the only material delta is "more first-party plugins reachable". Mitigation is that the allowlist is still hardcoded to OpenAI-owned identifiers, and the per-pluginenabledflag inopenclaw.jsonstill controls whether each one is active.Repro + Verification
Environment
/opt/homebrew/lib/node_modules/openclaw)gpt-5.4viaagentRuntime.id=codex(Codex app-server harness)plugins.entries.codex.config.codexPlugins.pluginspopulated with one plugin per marketplace as shown above. Codex CLI auth profile under~/.openclaw/agents/main/agent/auth-profiles.json.Steps
codexPlugins.pluginsentry withmarketplaceName: "openai-bundled"andpluginName: "chrome"to~/.openclaw/openclaw.jsonwhile onupstream/main(no patch). Repeat withopenai-primary-runtime+documents.openclaw restart. Observechromeanddocumentsmissing from the resolved policy.openclaw restart. Observechromeanddocumentsnow present in the resolved policy.Expected
chromeanddocumentsresolve aspluginPolicies[]entries identical in shape to a curated plugin.Actual
After the patch: matches expected. Before the patch: both entries silently dropped at schema validation.
Evidence
upstream/mainand pass on this branch)Human Verification
chrome(openai-bundled), enablingdocuments(openai-primary-runtime), enablinggoogle-calendar(openai-curated) all in the sameopenclaw.json, gateway restarting cleanly, all three appearing in the resolved Codex plugin policy."enabled": falsestill drops it; mixing curated and bundled plugins in the same config block works.Review Conversations
Compatibility / Migration
openai-curatedconfigs behave identically. The allowlist is a superset.Risks and Mitigations
pluginNamedoes not exist in the named marketplace will still get admitted topluginPoliciesand only fail at the Codex app-server layer.