Skip to content

Docker image should keep the Codex plugin for the default OpenAI harness #83613

@liorb-mountapps

Description

@liorb-mountapps

Summary

Official Docker images should keep the codex plugin in /app/dist/extensions/codex.

codex is plugin-shaped, but it is not an arbitrary optional plugin for Docker. It registers the codex agent harness, and OpenAI agent models route to the Codex harness by default. When the official image prunes dist/extensions/codex/**, the image ships without the runtime needed for the default OpenAI path.

Why this matters

In v2026.5.12, a Docker image could start and pass readiness while /v1/chat/completions failed with:

Requested agent harness "codex" is not registered.

That symptom was mitigated by #82532, which falls back to PI when the implicit Codex harness is unavailable. That is useful defense, but the base image should still include the default OpenAI harness owner.

Current packaging path

Relevant files:

  • package.json:41 excludes !dist/extensions/codex/**.
  • scripts/prune-docker-plugin-dist.mjs:23 prunes excluded plugin dist folders unless kept by OPENCLAW_EXTENSIONS.
  • Dockerfile:131 runs the prune step during runtime image assembly.
  • .github/workflows/docker-release.yml:158 and :256 build official images with OPENCLAW_EXTENSIONS=diagnostics-otel, not codex.

The result is that official Docker images can omit /app/dist/extensions/codex.

Expected behavior

Official Docker images should include /app/dist/extensions/codex by default.

This should not depend on passing:

OPENCLAW_EXTENSIONS=codex

Codex should be treated as product-core packaging for official images because it owns the default OpenAI agent harness path.

Proposed fix

Do not prune dist/extensions/codex/** for official Docker images.

Preferred shape:

  • remove !dist/extensions/codex/** from the effective Docker prune set, or
  • special-case scripts/prune-docker-plugin-dist.mjs so codex is never pruned for official runtime images.

Keep #82532's fallback behavior as defense, but do not make fallback the normal path for official Docker images.

Verification

Build an official-style Docker image and check:

docker run --rm --entrypoint bash ghcr.io/openclaw/openclaw:<fixed-tag> -lc '
  test -f /app/dist/extensions/codex/openclaw.plugin.json
  openclaw plugins inspect codex --runtime --json
'

Expected:

  • /app/dist/extensions/codex/openclaw.plugin.json exists.
  • openclaw plugins inspect codex --runtime --json shows the plugin loaded.
  • Runtime inspection shows agentHarnessIds includes codex.

Related: #82437, #82532.

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions