Skip to content

Commit e1b8150

Browse files
authored
fix(codex): let owners install plugins from discovered marketplaces (#122389)
* fix(codex): allow owner-approved marketplace plugins * fix(codex): preserve marketplace validation and remove unused exports * docs(codex): clarify already-installed plugin authorization
1 parent 88d6b57 commit e1b8150

36 files changed

Lines changed: 3773 additions & 347 deletions

‎docs/gateway/configuration-reference.md‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,16 @@ conversation bindings, or any non-Codex harness.
346346
Default: `true` for explicit entries.
347347
- `plugins.entries.codex.config.codexPlugins.plugins.<key>.marketplaceName`:
348348
stable marketplace identity, required with `pluginName` for every resolved
349-
entry. Supports `"openai-curated"` and `"workspace-directory"`. Entries
350-
missing either identity field are ignored.
349+
entry. Supports any valid marketplace already discoverable by Codex,
350+
including `"openai-curated"`, `"openai-bundled"`,
351+
`"openai-primary-runtime"`, `"workspace-directory"`, and repository-local
352+
marketplace identities. Entries missing either identity field are ignored.
351353
- `plugins.entries.codex.config.codexPlugins.plugins.<key>.pluginName`: stable
352-
Codex plugin identity, required with `marketplaceName`. A
353-
`workspace-directory` entry must use the exact marketplace-qualified
354-
`summary.id` returned by `plugin/list`, for example
355-
`"example-plugin@workspace-directory"`.
354+
Codex plugin identity, required with `marketplaceName`. Use the exact
355+
identity reported by Codex for marketplaces whose plugin identifiers are
356+
marketplace-qualified. `/codex plugins available` lists discoverable
357+
identities, and an owner or `operator.admin` can install one with
358+
`/codex plugins install <plugin>@<marketplace>`.
356359
- `plugins.entries.codex.config.codexPlugins.plugins.<key>.allow_destructive_actions`:
357360
per-plugin destructive-action override. When omitted, the global
358361
`allow_destructive_actions` value is used. The per-plugin value accepts the
@@ -363,15 +366,13 @@ to the human reviewer. Other apps and non-app thread approvals keep their
363366
configured reviewer, so mixed plugin policies do not inherit `"ask"` behavior.
364367

365368
`codexPlugins.enabled` is the global enablement directive. Explicit plugin
366-
entries written by migration are the durable curated install and repair
367-
eligibility set. Manually configured `workspace-directory` entries must already
368-
be installed and enabled, and their owned apps must be accessible; OpenClaw
369-
does not install or authenticate them. If Codex rejects the explicit workspace
370-
catalog request, enabled workspace entries fail closed with
371-
`marketplace_missing` while curated entries from the default catalog remain
372-
available. `plugins["*"]` is not supported, there is no `install` switch, and
373-
local `marketplacePath` values are intentionally not config fields because they
374-
are host-specific. See
369+
entries written by migration preserve durable curated install and repair
370+
eligibility. An owner or `operator.admin` can add other discovered plugins with
371+
`/codex plugins install <plugin>@<marketplace>`; Codex still controls upstream
372+
installation and connector authentication. Plugins without exact identity,
373+
installation, or accessible app ownership fail closed. `plugins["*"]` is not
374+
supported, and local `marketplacePath` values are intentionally not config
375+
fields because they are host-specific. See
375376
[Native Codex plugins](/plugins/codex-native-plugins) for app-server version and
376377
readiness requirements.
377378

‎docs/plugins/codex-harness-reference.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,14 @@ structured SecretRefs fail before any token or header is sent.
275275

276276
When native Codex plugins are configured, OpenClaw caches one
277277
runtime-and-workspace-scoped `plugin/installed` snapshot. This snapshot covers
278-
installed curated and workspace plugins, including disabled ownership;
278+
installed plugins from Codex-discovered marketplaces, including disabled ownership;
279279
`plugin/read` resolves only exact configured plugin identities. Failed or
280-
incomplete installed snapshots are never cached. OpenClaw uses `plugin/list`
281-
only to find or repair an explicitly enabled curated plugin missing from that
282-
installed snapshot. It calls `plugin/install` only for an explicitly configured
283-
enabled curated plugin; it never installs, enables, or authenticates a
284-
workspace plugin.
280+
incomplete installed snapshots are never cached. `/codex plugins available`
281+
queries `plugin/list` for the current conversation workspace, while
282+
`/codex plugins install <plugin>@<marketplace>` installs only after an owner or
283+
`operator.admin` explicitly authorizes that plugin. Existing explicitly
284+
configured curated plugins retain their automatic recovery path. The model's
285+
plugin-discovery tool cannot install, enable, or authenticate a plugin.
285286

286287
`app/installed` reports installed app runtime state, and `app/read` returns
287288
authenticated metadata for at most 100 requested app IDs per call. OpenClaw

‎docs/plugins/codex-harness.md‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,8 @@ Keep provider refs and runtime policy separate:
499499
| List or filter Codex threads | `/codex threads [filter]` |
500500
| Read or update the bound thread's native goal | `/codex goal [status\|set <objective>\|pause\|resume\|block\|complete\|clear]` |
501501
| List native Codex plugins | `/codex plugins list` |
502+
| Discover available native Codex marketplace plugins | `/codex plugins available` |
503+
| Install and authorize one native Codex plugin | `/codex plugins install <plugin>@<marketplace>` |
502504
| Enable or disable a configured native Codex plugin | `/codex plugins enable <name>`, `/codex plugins disable <name>` |
503505
| Resume a stored Codex CLI session as a paired-node turn | `/codex sessions --host <node> [filter]`, then `/codex resume <session-id> --host <node> --bind here` |
504506
| View non-archived Codex sessions across computers | Enable Codex supervision and open **Codex Sessions** |
@@ -736,8 +738,12 @@ Common forms:
736738
- `/codex account` shows account and rate-limit status.
737739
- `/codex mcp` lists Codex app-server MCP server status.
738740
- `/codex skills` lists Codex app-server skills.
739-
- `/codex plugins list`, `/codex plugins enable <name>`, and
740-
`/codex plugins disable <name>` manage configured native Codex plugins.
741+
- `/codex plugins list` shows configured native plugins; `/codex plugins
742+
available` discovers Codex marketplace plugins in the bound workspace.
743+
- `/codex plugins install <plugin>@<marketplace>` installs and authorizes one
744+
discovered plugin. `/codex plugins enable <name>` and `/codex plugins
745+
disable <name>` update its persisted policy. Mutations require an owner or
746+
`operator.admin` gateway client.
741747
- `/codex computer-use [status|install]` manages Codex Computer Use.
742748
- `/codex help` lists the full command tree.
743749

@@ -815,10 +821,12 @@ model or Codex runtime.
815821

816822
When native Codex plugins are configured, OpenClaw reads and caches one
817823
runtime-and-workspace-scoped `plugin/installed` snapshot. That one snapshot
818-
covers both curated and workspace plugins, including disabled plugin ownership.
819-
`plugin/read` resolves only explicitly configured plugin details; `plugin/list`
820-
is reserved for finding or repairing an explicitly enabled missing curated
821-
plugin. OpenClaw never installs, enables, or authenticates workspace plugins.
824+
covers configured plugins from Codex-discovered marketplaces, including
825+
disabled plugin ownership. `plugin/read` resolves only explicitly configured
826+
plugin details. `/codex plugins available` queries `plugin/list` with the
827+
bound workspace, while `/codex plugins install <plugin>@<marketplace>` is the
828+
owner- or administrator-authorized installation path. Routine thread setup
829+
retains existing explicitly configured curated-plugin recovery.
822830

823831
`app/installed` supplies the installed app runtime snapshot, and `app/read`
824832
supplies authenticated app metadata in batches of at most 100 app IDs. OpenClaw
@@ -846,8 +854,8 @@ the `plugin/installed` snapshot and reads only the exact configured plugin's
846854
details to keep its apps denied. This check never installs, enables, or
847855
authenticates the plugin.
848856

849-
OpenClaw does not install unknown apps; it activates only explicitly configured
850-
marketplace plugins with `plugin/install` and refreshes their installed
857+
OpenClaw does not install unknown apps or let the model authorize new plugin
858+
installs. Owner-approved plugin installation refreshes the target runtime
851859
inventory. Missing inventory methods, authentication errors, transport
852860
failures, and connector refresh failures fail closed.
853861

0 commit comments

Comments
 (0)