Skip to content

[Feature]: Manage Codex sub-plugins, permissions, and account from chat instead of editing openclaw.json #82218

Description

@yaanfpv

Summary

Today, every Codex setting that an Openclaw user might want to flip lives inside ~/.openclaw/openclaw.json (or behind a one-off CLI). There is no slash command, no picker, and no Telegram surface for the most common Codex operations: enabling/disabling a sub-plugin, switching the approval policy, checking which Codex account is signed in. Add a first-party /codex slash command with a small picker tree so these operations are reachable from chat.

Problem to solve

Codex now ships with a handful of sub-plugins (chrome, browser, computer-use, documents, spreadsheets, presentations, and the curated catalog). Every one of them has to be wired into openclaw by hand-editing plugins.entries.codex.config.codexPlugins.plugins and then restarting the gateway. That is friction for two reasons:

  1. The user has to know the marketplace name, the plugin name, the exact JSON shape, and the migration story. Mis-entering any of that silently drops the plugin.
  2. Even when the JSON is right, there is no easy way to flip a plugin on or off from chat. The Telegram and Discord users who run openclaw the most never see openclaw.json at all.

Beyond plugins, two other Codex knobs are also chat-invisible: the approval-policy mode (default vs yolo, plus a quick "what mode am I in") and the active Codex account (which OpenAI account is currently bound). These get asked about often enough that they belong in the chat surface too.

Proposed solution

Add a /codex slash command, owned by the @openclaw/codex plugin, with these top-level verbs:

  • /codex plugins. List, enable, disable, toggle, add, remove for Codex sub-plugins. When called with no name, opens a picker.
  • /codex permissions. Show the current approval policy mode and switch between default and yolo.
  • /codex account. Show the currently bound Codex account.
  • /codex help. Codex-scoped help listing every verb.

When /codex is called with no verb on Telegram, the bot should reply with a 4-button picker (plugins, permissions, account, help) in a 2x2 grid. Picker buttons should edit the message in place (mirrors the /model Browse providers pattern), with parent-aware back buttons. The plugin enable/disable/toggle pickers should be dynamic, populated from the live ~/.openclaw/openclaw.json instead of a hardcoded list, so that Codex migration adding new plugins (e.g. a future computer-use rename) shows up automatically.

The chat surface should not duplicate verbs that already exist at the openclaw level (/status, /help, /stop, /models, /fast). Those stay typeable but do not need a button.

Alternatives considered

  • Document the JSON schema better and point users at openclaw.json directly. Discoverable but does nothing for Telegram users and still requires a restart guess.
  • Add only a flag-based CLI command (openclaw codex plugins enable chrome). Useful for power users but invisible in chat. Telegram and Discord users still cannot manage Codex without dropping out of their channel.
  • Surface Codex plugins inside /model or some other existing command. Overloads a command that is already busy, mixes provider routing with plugin management.

The chat-first picker is the only path that solves Telegram, Discord, and CLI in one stroke.

Impact

Affected: every Openclaw user with the Codex plugin enabled. That is anyone running agentRuntime.id=codex on Mac Gateway, Telegram, or Discord.
Severity: Medium. Codex still works without this, but the bundled and primary-runtime sub-plugins are effectively invisible. The day-to-day "is computer-use on, do I need to restart, how do I flip yolo for one task" loop is currently a JSON edit plus a gateway restart.
Frequency: Daily for active Codex users.
Consequence: People either give up on the non-curated plugins or maintain their openclaw.json by hand. The bot has no answer when a Telegram user asks "what Codex plugins do I have on right now".

Evidence/examples

Prior art inside this repo for the same pattern:

  • /model Browse providers picker. Cross-extension UI ownership (extensions/telegram/src/model-buttons.ts owns the Telegram surface for an extension shipped elsewhere). In-place message edit via callback_query handlers.
  • extensions/codex/src/migration/apply.ts already knows how to materialize the Codex sub-plugins into openclaw.json on openclaw update. The chat surface just has to read/write that same structure.

Issue #82216 (Codex bundled plugins like chrome and computer-use cannot be enabled from openclaw.json) is the data-layer counterpart to this UX issue. Without it, the chat surface can only manage curated plugins. Both should land together. The data-layer fix is in flight as PR #82219.

Additional information

PR #82224 covers the full chat surface: the /codex plugins subcommand (list, enable, disable, toggle, add, remove, help) AND the picker UX redesign (4-button top picker in 2x2 grid, in-place message edit via cdx_* callbacks, parent-aware back navigation, dynamic plugin pickers reading the live config). The /codex slash command was written from scratch for this issue specifically. There is no prior /codex to extend.

Searched for related issues before filing:

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestimpact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions