openclaw - 💡(How to fix) Fix [Bug]: [Beta][Windows] 2026.5.24-beta.1 Codex harness fails: removed plugin-sdk/codex-native-task-runtime export still imported by @openclaw/codex

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…

On Windows, OpenClaw 2026.5.24-beta.1 loads @openclaw/codex but Codex agent turns fail before reply because the plugin imports the removed openclaw/plugin-sdk/codex-native-task-runtime export.

Error Message

Version: openclaw --version OpenClaw 2026.5.24-beta.1 (0e2e7c6)

Doctor was run before the second repro. It completed, restarted the gateway, and did not resolve the issue.

Gateway startup after doctor: 17:05:01 [gateway] auto-enabled plugins for this runtime without writing config:

  • codex agent runtime configured, enabled automatically. 17:05:05 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: brave (...), codex (C:\Users\Admin.openclaw pmode_modules@openclaw\codex\dist\index.js). 17:05:06 [gateway] agent model: openai/gpt-5.5 (thinking=medium, fast=off) 17:05:06 [gateway] http server listening (9 plugins: brave, browser, canvas, codex, device-pair, file-transfer, memory-core, phone-control, talk-voice; 5.8s) 17:05:07 [gateway] ready

Failure on normal chat turn: 17:07:37 [agents/harness] Codex agent harness failed; not falling back to embedded PI backend 17:07:37 [diagnostic] lane task error: lane=main durationMs=7631 error="Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './plugin-sdk/codex-native-task-runtime' is not defined by "exports" in C:\Users\Admin.openclaw pm ode_modules@openclaw\codex ode_modules\openclaw\package.json imported from C:\Users\Admin.openclaw pm ode_modules@openclaw\codex\dist\run-attempt-CRHVB240.js" 17:07:37 Embedded agent failed before reply: Package subpath './plugin-sdk/codex-native-task-runtime' is not defined by "exports" in C:\Users\Admin.openclaw pmode_modules@openclaw\codex ode_modules\openclaw\package.json imported from C:\Users\Admin.openclaw pm ode_modules@openclaw\codex\dist\run-attempt-CRHVB240.js

Version/export comparison from npm metadata:

Root Cause

On Windows, OpenClaw 2026.5.24-beta.1 loads @openclaw/codex but Codex agent turns fail before reply because the plugin imports the removed openclaw/plugin-sdk/codex-native-task-runtime export.

Fix Action

Fix / Workaround

Consequence: User messages to the affected Codex-backed agent do not receive assistant replies. Doctor/restart did not recover the setup, so the practical workaround appears to require changing version/plugin state or avoiding this beta for Codex.

Code Example

Version:
openclaw --version
OpenClaw 2026.5.24-beta.1 (0e2e7c6)

Doctor was run before the second repro. It completed, restarted the gateway, and did not resolve the issue.

Gateway startup after doctor:
17:05:01 [gateway] auto-enabled plugins for this runtime without writing config:
- codex agent runtime configured, enabled automatically.
17:05:05 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: brave (...), codex (C:\Users\Admin\.openclaw
pmode_modules\@openclaw\codex\dist\index.js).
17:05:06 [gateway] agent model: openai/gpt-5.5 (thinking=medium, fast=off)
17:05:06 [gateway] http server listening (9 plugins: brave, browser, canvas, codex, device-pair, file-transfer, memory-core, phone-control, talk-voice; 5.8s)
17:05:07 [gateway] ready

Failure on normal chat turn:
17:07:37 [agents/harness] Codex agent harness failed; not falling back to embedded PI backend
17:07:37 [diagnostic] lane task error: lane=main durationMs=7631 error="Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './plugin-sdk/codex-native-task-runtime' is not defined by "exports" in C:\Users\Admin\.openclaw
pm
ode_modules\@openclaw\codex
ode_modules\openclaw\package.json imported from C:\Users\Admin\.openclaw
pm
ode_modules\@openclaw\codex\dist\run-attempt-CRHVB240.js"
17:07:37 Embedded agent failed before reply: Package subpath './plugin-sdk/codex-native-task-runtime' is not defined by "exports" in C:\Users\Admin\.openclaw
pmode_modules\@openclaw\codex
ode_modules\openclaw\package.json imported from C:\Users\Admin\.openclaw
pm
ode_modules\@openclaw\codex\dist\run-attempt-CRHVB240.js

Version/export comparison from npm metadata:
- openclaw@2026.5.20-beta.2 exported ./plugin-sdk/codex-native-task-runtime
- openclaw@2026.5.22 and openclaw@2026.5.24-beta.1 export ./plugin-sdk/agent-harness-task-runtime instead
- @openclaw/codex@2026.5.24-beta.1 declares peerDependency openclaw >=2026.5.24-beta.1, but the runtime still imports the removed codex-native-task-runtime path
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

Yes

Summary

On Windows, OpenClaw 2026.5.24-beta.1 loads @openclaw/codex but Codex agent turns fail before reply because the plugin imports the removed openclaw/plugin-sdk/codex-native-task-runtime export.

Steps to reproduce

  1. On Windows, update/install OpenClaw to 2026.5.24-beta.1 with the Codex plugin available.
  2. Start or restart the gateway.
  3. Verify the gateway logs show the Codex agent runtime auto-enabled and the codex plugin loaded.
  4. Send a normal chat message using the Codex-backed agent/model.
  5. Observe that the agent turn fails before reply with ERR_PACKAGE_PATH_NOT_EXPORTED for openclaw/plugin-sdk/codex-native-task-runtime.

Expected behavior

A Codex-backed agent turn should start the Codex harness and produce a reply; on the same Windows host, Codex agent turns previously worked on 2026.5.20-beta.2 after reinstalling the Codex plugin.

Actual behavior

The gateway starts and reports the Codex runtime/plugin as loaded, but a normal chat turn fails before any assistant reply. The logs show: "Codex agent harness failed; not falling back to embedded PI backend" followed by ERR_PACKAGE_PATH_NOT_EXPORTED for "./plugin-sdk/codex-native-task-runtime" imported from C:\Users\Admin.openclaw pm ode_modules@openclaw\codex\dist\run-attempt-CRHVB240.js. Running openclaw doctor and restarting the gateway did not resolve the failure.

OpenClaw version

2026.5.24-beta.1

Operating system

Windows 11

Install method

npm global

Model

gpt5-5

Provider / routing chain

OpenClaw WebChat/Control UI -> local OpenClaw gateway on ws://127.0.0.1:18789 -> main agent session -> Codex agent harness via @openclaw/codex -> configured model openai/gpt-5.5. The request fails inside the local Codex plugin/runtime before reaching a successful provider response.

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Version:
openclaw --version
OpenClaw 2026.5.24-beta.1 (0e2e7c6)

Doctor was run before the second repro. It completed, restarted the gateway, and did not resolve the issue.

Gateway startup after doctor:
17:05:01 [gateway] auto-enabled plugins for this runtime without writing config:
- codex agent runtime configured, enabled automatically.
17:05:05 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: brave (...), codex (C:\Users\Admin\.openclaw
pmode_modules\@openclaw\codex\dist\index.js).
17:05:06 [gateway] agent model: openai/gpt-5.5 (thinking=medium, fast=off)
17:05:06 [gateway] http server listening (9 plugins: brave, browser, canvas, codex, device-pair, file-transfer, memory-core, phone-control, talk-voice; 5.8s)
17:05:07 [gateway] ready

Failure on normal chat turn:
17:07:37 [agents/harness] Codex agent harness failed; not falling back to embedded PI backend
17:07:37 [diagnostic] lane task error: lane=main durationMs=7631 error="Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './plugin-sdk/codex-native-task-runtime' is not defined by "exports" in C:\Users\Admin\.openclaw
pm
ode_modules\@openclaw\codex
ode_modules\openclaw\package.json imported from C:\Users\Admin\.openclaw
pm
ode_modules\@openclaw\codex\dist\run-attempt-CRHVB240.js"
17:07:37 Embedded agent failed before reply: Package subpath './plugin-sdk/codex-native-task-runtime' is not defined by "exports" in C:\Users\Admin\.openclaw
pmode_modules\@openclaw\codex
ode_modules\openclaw\package.json imported from C:\Users\Admin\.openclaw
pm
ode_modules\@openclaw\codex\dist\run-attempt-CRHVB240.js

Version/export comparison from npm metadata:
- [email protected] exported ./plugin-sdk/codex-native-task-runtime
- [email protected] and [email protected] export ./plugin-sdk/agent-harness-task-runtime instead
- @openclaw/[email protected] declares peerDependency openclaw >=2026.5.24-beta.1, but the runtime still imports the removed codex-native-task-runtime path

Impact and severity

Affected users/systems/channels: Observed on a Windows npm/OpenClaw updater beta install using the @openclaw/codex plugin and a Codex-backed main agent model (openai/gpt-5.5) through the local WebChat/Control UI gateway.

Severity: Blocks workflow for this configuration. The gateway starts, but Codex-backed agent turns fail before any assistant reply is produced.

Frequency: Reproduced after doctor/restart on a normal chat turn in 2026.5.24-beta.1. Based on the current evidence, this is reproducible on the affected host; broader frequency is not yet known.

Consequence: User messages to the affected Codex-backed agent do not receive assistant replies. Doctor/restart did not recover the setup, so the practical workaround appears to require changing version/plugin state or avoiding this beta for Codex.

Additional information

Last known good observed on this host: 2026.5.20-beta.2, after manually uninstalling/reinstalling the Codex plugin.

First known bad observed on this host: 2026.5.24-beta.1 (0e2e7c6).

This may be related to the SDK export rename from codex-native-task-runtime to agent-harness-task-runtime. The failure path shows @openclaw/codex importing the old codex-native-task-runtime subpath from its nested openclaw package, while current openclaw packages no longer expose that export.

openclaw doctor was run before the attached repro and did not resolve the issue.

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…

FAQ

Expected behavior

A Codex-backed agent turn should start the Codex harness and produce a reply; on the same Windows host, Codex agent turns previously worked on 2026.5.20-beta.2 after reinstalling the Codex plugin.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: [Beta][Windows] 2026.5.24-beta.1 Codex harness fails: removed plugin-sdk/codex-native-task-runtime export still imported by @openclaw/codex