openclaw - 💡(How to fix) Fix Codex embedded agent: Cannot find module './codex-mcp-config-D66js4SP.js' on v2026.5.19

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Error Message

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

Root Cause

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.

Fix Action

Workaround

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

Code Example

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

---

[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']

---

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'
RAW_BUFFERClick to expand / collapse

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'

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING