Skip to content

Codex embedded agent: Cannot find module './codex-mcp-config-D66js4SP.js' on v2026.5.19 #85050

@rbueno69-git

Description

@rbueno69-git

Bug Report

OpenClaw version: 2026.5.19 (a185ca2)
@openclaw/codex version: 2026.5.19
OS: Linux 6.8.0-117-generic (x64)
Node: v22.22.2

Description

Any agent configured with model codex/gpt-5.5 in agents.list[] fails immediately with:

Error: Cannot find module './codex-mcp-config-D66js4SP.js'

The file codex-mcp-config-D66js4SP.js does not exist in the installed plugin's dist/ directory — not after fresh install, not after --force reinstall, not after running postinstall-bundled-plugins.mjs.

Steps to Reproduce

  1. Add an agent to agents.list with "model": "codex/gpt-5.5"
  2. Restart gateway
  3. Send any message to that agent
  4. Error fires immediately on every request

Expected Behavior

Agent uses the Codex harness and responds via ChatGPT subscription (OAuth).

Actual Behavior

[diagnostic] lane task error: lane=session:agent:dudu:main durationMs=2601 error="Error: Cannot find module './codex-mcp-config-D66js4SP.js'"
[Embedded agent failed before reply: Cannot find module './codex-mcp-config-D66js4SP.js']

Notes

  • The Codex bot harness (@PinkRBCodexbot via native Codex channel) works fine — only embedded agent model fails
  • Running openclaw doctor --fix does not resolve
  • Reinstalling @openclaw/codex@latest --force does not resolve
  • File is simply absent from the dist/ bundle

Workaround

Set the agent model to openrouter/anthropic/claude-sonnet-4.6 — works normally but does not use the ChatGPT subscription.

Relevant log

2026-05-21T19:42:28.840+02:00 [diagnostic] lane task error: lane=session:agent:dudu:main durationMs=2561 error="Error: Cannot find module './codex-mcp-config-D66js4SP.js'
2026-05-21T19:42:28.848+02:00 Embedded agent failed before reply: Cannot find module './codex-mcp-config-D66js4SP.js'

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    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