openclaw - 💡(How to fix) Fix [Beta report] 2026.5.12-beta.2: Codex runtime still fails loading codex-native-task-runtime

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…

Sanitized beta verification report for 2026.5.12-beta.2, tested specifically because this build was expected to fix the Codex plugin/runtime issue from the previous beta.

Upgrade result: package update succeeded from 2026.5.12-beta.1 to 2026.5.12-beta.2, gateway restarted on the new version, @openclaw/codex updated to 2026.5.12-beta.2, doctor migrated the default and cron models to openai/gpt-*, channels remained connected, and representative cron jobs remained ok. However, a fresh direct agent smoke test still did not run on the Codex/OpenAI primary route. The openai/gpt-5.5 + codex runtime failed with MODULE_NOT_FOUND, and the run completed through Anthropic fallback.

Error Message

provider: openai model: gpt-5.5 code: MODULE_NOT_FOUND error: Cannot find module '<global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime' Require stack:

  • <state>/npm/node_modules/@openclaw/codex/dist/run-attempt-*.js

Root Cause

Sanitized beta verification report for 2026.5.12-beta.2, tested specifically because this build was expected to fix the Codex plugin/runtime issue from the previous beta.

Fix Action

Fix / Workaround

  1. Start from an OAuth/Codex-authenticated OpenClaw host on 2026.5.12-beta.1 where the previous workaround had restored openai-codex/gpt-* model refs.
  2. Run openclaw update --channel beta and land on 2026.5.12-beta.2.
  3. Observe successful host update and @openclaw/[email protected] installation.
  4. Observe model normalization to openai/gpt-* with agentRuntime.id = codex.
  5. Run a fresh direct agent smoke test: openclaw agent --agent main --session-id <fresh> --message "Reply exactly: ..." --timeout 180 --json
  6. Observe the OpenAI/Codex primary route fail with MODULE_NOT_FOUND for <global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime.
  7. Observe Anthropic fallback complete the turn, so the command returns status: ok despite the broken primary route.

Code Example

agents.defaults.model.primary = openai/gpt-5.5
main.model.primary = openai/gpt-5.5
cron.model.primary = openai/gpt-5.5
mini-cron.model.primary = openai/gpt-5.4-mini
openai/gpt-* model map entries use agentRuntime.id = codex
cron payloads were normalized to openai/gpt-*

---

@openclaw/codex version: 2026.5.12-beta.2
peerDependency: openclaw >=2026.5.12-beta.2

---

provider: openai
model: gpt-5.5
code: MODULE_NOT_FOUND
error: Cannot find module '<global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime'
Require stack:
- <state>/npm/node_modules/@openclaw/codex/dist/run-attempt-*.js

---

<state>/npm/node_modules/@openclaw/codex/dist/run-attempt-*.js:
import { ... } from "openclaw/plugin-sdk/codex-native-task-runtime";

---

<global-openclaw>/dist/plugin-sdk/root-alias.cjs
<global-openclaw>/dist/plugin-sdk/codex-native-task-runtime.js
<global-openclaw>/dist/plugin-sdk/codex-native-task-runtime.d.ts

---

<global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime

---

status: ok
text: expected smoke-test text
final provider: anthropic
final model: claude-opus-4-7
fallbackAttempts: [openai/gpt-5.5 MODULE_NOT_FOUND]

---

winnerProvider: anthropic
winnerModel: claude-opus-4-7
fallbackUsed: false
attempts: only anthropic success

---

Before: 2026.5.12-beta.1
After: 2026.5.12-beta.2
RAW_BUFFERClick to expand / collapse

Summary

Sanitized beta verification report for 2026.5.12-beta.2, tested specifically because this build was expected to fix the Codex plugin/runtime issue from the previous beta.

Upgrade result: package update succeeded from 2026.5.12-beta.1 to 2026.5.12-beta.2, gateway restarted on the new version, @openclaw/codex updated to 2026.5.12-beta.2, doctor migrated the default and cron models to openai/gpt-*, channels remained connected, and representative cron jobs remained ok. However, a fresh direct agent smoke test still did not run on the Codex/OpenAI primary route. The openai/gpt-5.5 + codex runtime failed with MODULE_NOT_FOUND, and the run completed through Anthropic fallback.

Severity-ranked findings

High: openai/gpt-* routed through codex still fails before model execution

Post-update model routing looked correct:

agents.defaults.model.primary = openai/gpt-5.5
main.model.primary = openai/gpt-5.5
cron.model.primary = openai/gpt-5.5
mini-cron.model.primary = openai/gpt-5.4-mini
openai/gpt-* model map entries use agentRuntime.id = codex
cron payloads were normalized to openai/gpt-*

Installed package snapshot:

@openclaw/codex version: 2026.5.12-beta.2
peerDependency: openclaw >=2026.5.12-beta.2

Direct smoke test result was status: ok, but final provider/model was Anthropic, not OpenAI/Codex. Sanitized fallback attempt:

provider: openai
model: gpt-5.5
code: MODULE_NOT_FOUND
error: Cannot find module '<global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime'
Require stack:
- <state>/npm/node_modules/@openclaw/codex/dist/run-attempt-*.js

The relevant import site in the installed Codex plugin is:

<state>/npm/node_modules/@openclaw/codex/dist/run-attempt-*.js:
import { ... } from "openclaw/plugin-sdk/codex-native-task-runtime";

The relevant OpenClaw package file layout is:

<global-openclaw>/dist/plugin-sdk/root-alias.cjs
<global-openclaw>/dist/plugin-sdk/codex-native-task-runtime.js
<global-openclaw>/dist/plugin-sdk/codex-native-task-runtime.d.ts

The runtime still appears to resolve the subpath as if root-alias.cjs were a directory:

<global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime

Expected: openai/gpt-5.5 should execute through the codex runtime without fallback.

Actual: openai/gpt-5.5 fails during module load; the agent only succeeds because Anthropic fallback completes the turn.

Medium: result metadata is confusing when this fallback happens

The direct smoke response showed:

status: ok
text: expected smoke-test text
final provider: anthropic
final model: claude-opus-4-7
fallbackAttempts: [openai/gpt-5.5 MODULE_NOT_FOUND]

But the execution trace also reported:

winnerProvider: anthropic
winnerModel: claude-opus-4-7
fallbackUsed: false
attempts: only anthropic success

This is confusing for beta validation because the top-level agent metadata clearly shows the primary route failed and a fallback provider won, while executionTrace.fallbackUsed says false and does not include the failed OpenAI attempt. This can make an unhealthy Codex primary route look cleaner than it is.

Medium/Low: updater still emits stale-binary restart warning

The update itself succeeded:

Before: 2026.5.12-beta.1
After: 2026.5.12-beta.2

During restart, the updater printed that config was written by 2026.5.12-beta.2 while the command was still running 2026.5.12-beta.1, then said the gateway already reported the updated version and skipped a redundant restart. The final gateway did report 2026.5.12-beta.2, so this was not blocking, but it remains noisy in upgrade validation.

Low / pre-existing or not attributed to this beta

The following were still present but do not appear newly introduced by this beta:

  • restrictive plugins.allow / bundled discovery compatibility warning
  • message-tool allowlist warning for routed channels
  • first-time setup policy warning for one channel
  • gateway token SecretRef unavailable in the doctor command path
  • orphan transcript files
  • bootstrap file near configured size limit
  • task audit warnings for old lost/delivery-failed tasks
  • deprecated config.loadConfig() plugin runtime warning despite plugins doctor reporting no plugin issues

Reproduction outline

  1. Start from an OAuth/Codex-authenticated OpenClaw host on 2026.5.12-beta.1 where the previous workaround had restored openai-codex/gpt-* model refs.
  2. Run openclaw update --channel beta and land on 2026.5.12-beta.2.
  3. Observe successful host update and @openclaw/[email protected] installation.
  4. Observe model normalization to openai/gpt-* with agentRuntime.id = codex.
  5. Run a fresh direct agent smoke test: openclaw agent --agent main --session-id <fresh> --message "Reply exactly: ..." --timeout 180 --json
  6. Observe the OpenAI/Codex primary route fail with MODULE_NOT_FOUND for <global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime.
  7. Observe Anthropic fallback complete the turn, so the command returns status: ok despite the broken primary route.

Final tested state

  • Installed version: 2026.5.12-beta.2.
  • Gateway: reachable and reporting the new version.
  • @openclaw/codex: 2026.5.12-beta.2.
  • Models/cron payloads: migrated to openai/gpt-*.
  • Representative cron jobs: ok at the status layer.
  • Direct Codex/OpenAI smoke: not healthy; primary route fails with MODULE_NOT_FOUND and fallback provider completes the run.

Expected fix direction

Please check the openclaw/plugin-sdk/codex-native-task-runtime subpath export / root-alias resolution path used by @openclaw/codex. The installed files exist as siblings under <global-openclaw>/dist/plugin-sdk/, but resolution is still attempting <global-openclaw>/dist/plugin-sdk/root-alias.cjs/codex-native-task-runtime.

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