Skip to content

[Feature]: Make OpenClaw sessions first-class in the Codex plugin #103621

Description

@steipete

Summary

Make OpenClaw sessions a first-class interactive surface in the official Codex plugin, including browsing, creating, reading, messaging, stopping, archiving, and restoring sessions.

Problem to solve

The official @openclaw/codex integration runs Codex through OpenClaw, but it does not currently give the Codex desktop app a useful OpenClaw session surface. A separate prototype can show Gateway health as a global plugin page, but that is not the user goal: people need their OpenClaw sessions, agent identity, live state, transcript, and composer where they already work in Codex.

The missing bridge also tempts integrations to parse OpenClaw config, vendor a Gateway client, expose raw session keys, or duplicate connection lifecycle. Those approaches drift quickly and risk leaking channel identifiers or internal transcript content.

Proposed solution

  • Extend the canonical openclaw mcp serve bridge with capability-detected session operations for list, history, create, send, abort, and safe session updates.
  • Keep one persistent Gateway connection and use the existing Gateway session RPCs rather than adding another protocol.
  • Project sessions through opaque IDs, expose only user/assistant visible text, bound output sizes, and return fixed safe errors.
  • Add dual-format Codex plugin metadata to extensions/codex so the published @openclaw/codex package can be installed directly as a Codex plugin.
  • Ship one responsive MCP App that uses master/detail navigation on current Codex builds and detail-only navigation when the host supplies a native session sidebar collection.
  • Show Working, Recent, and Archived groups; agent image/emoji/initial fallbacks; unread and run state; a transcript/composer; stop; archive/restore; and a compact Gateway status/diagnostics control.
  • Hide controls that the connected Gateway does not advertise or the granted operator scope cannot perform.

Alternatives considered

  1. Keep a Gateway-health dashboard as the primary page. It is useful diagnostics, but not an everyday session workflow.
  2. Vendor a generated Gateway client and parse openclaw.json inside a separate Codex-only repository. This duplicates the supported MCP bridge and becomes stale as OpenClaw changes.
  3. Wait for a native Codex sidebar API before shipping. The MCP App can provide a useful master/detail experience now and progressively adopt host-native collections later.
  4. Merge this with Make Codex supervision interactive and owned by the Codex plugin #103235. That issue covers the opposite direction—OpenClaw supervising Codex sessions—so combining them would blur runtime ownership and make both changes much harder to review.

Impact

  • Affected: OpenClaw users who also use the Codex desktop app.
  • Severity: the current integration is diagnostic/read-only for this workflow and does not support normal session work.
  • Frequency: every time a user wants to continue an OpenClaw conversation from Codex.
  • Consequence: users switch products or build brittle local integrations instead of using the official plugin.

Evidence/examples

  • openclaw mcp serve already owns OpenClaw config resolution, Gateway authentication, connection lifecycle, and live subscription behavior.
  • Gateway already exposes the required session list, history, create, send, abort, subscribe, and patch operations.
  • extensions/codex already owns the published official Codex integration, so the bundle belongs there rather than in a new repository.
  • Make Codex supervision interactive and owned by the Codex plugin #103235 is complementary work for interactive Codex supervision from OpenClaw.

Additional information

The host-native sidebar collection is an additive optimization. The global master/detail MCP App remains the compatibility path for Codex versions that do not understand the collection contribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestimpact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.maintainerMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions