openclaw - 💡(How to fix) Fix [Bug]: Codex harness fails with listRegisteredPluginAgentPromptGuidance SyntaxError on Windows (5.19, 5.20, 5.22) — event loop stall up to 287s

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 with Codex OAuth (openai-codex/gpt-5.5), the Codex agent harness fails on every turn with SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance', causing all three fallback models to fail and the gateway event loop to stall for up to 287 seconds before recovery.

Error Message

Gateway log excerpts from 2026.5.22 (redacted):

--- First message attempt --- [agent/embedded] strict-agentic execution contract active: runId=b65c232e... provider=openai-codex/gpt-5.5 harness=codex configured=unspecified [agents/harness] Codex agent harness failed; not falling back to embedded PI backend [diagnostic] lane task error: lane=main durationMs=7682 error="SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'" [model-fallback/decision] decision=candidate_failed requested=openai-codex/gpt-5.5 next=anthropic/claude-sonnet-4-6

[diagnostic] lane task error: lane=main durationMs=21532 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released" [model-fallback/decision] decision=candidate_failed requested=openai-codex/gpt-5.5 candidate=anthropic/claude-sonnet-4-6 next=openai/gpt-5

[agent/embedded] strict-agentic execution contract active: provider=openai/gpt-5 harness=codex [agents/harness] Codex agent harness failed; not falling back to embedded PI backend [diagnostic] lane task error: error="SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'" Embedded agent failed before reply: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'

--- Event loop stall (2026.5.22 only) --- [diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu interval=291s eventLoopDelayP99Ms=286957.5 eventLoopDelayMaxMs=286957.5 eventLoopUtilization=1 cpuCoreRatio=1.008 [diagnostic] stalled session: state=processing age=296s reason=active_work_without_progress classification=stalled_agent_run lastProgress=embedded_run:started lastProgressAge=296s recovery=none

--- Known good (2026.5.12) --- [agent/embedded] strict-agentic execution contract active: provider=openai-codex/gpt-5.5 harness=codex configured=unspecified [whatsapp] Sent message (reply delivered successfully, no errors)

Versions confirmed affected: 2026.5.19 (a185ca2), 2026.5.20 (e510042), 2026.5.22 (a374c3a) Last known good: 2026.5.12 (f066dd2) Rollback to 2026.5.12 resolves the issue immediately.

Root Cause

Additional observations:

  • 2026.5.22 introduced a new secondary issue: OpenRouter and LiteLLM pricing fetch both timeout after 60s at every gateway startup, adding ~60s to startup time
  • WhatsApp plugin on 5.19/5.20/5.22 uses Baileys 7.0.0-rc13 which addresses the rc11 spoofing vulnerability (GHSA-qvv5-jq5g-4cgg) — this is a positive change but does not affect the Codex bug
  • The Codex app-server path fix (plugins.entries.codex.config.appServer.command) required since 2026.5.12 on Windows was re-applied before testing — the bug is not caused by a missing path fix

Fix Action

Fix / Workaround

agents.defaults.model.primary = openai-codex/gpt-5.5 agents.list[id="main"].model.primary = openai-codex/gpt-5.5 Auth profile: openai-codex:[email protected] (OAuth mode) plugins.entries.codex.config.appServer.command explicitly set to: C:\Users\Openclaw.openclaw\npm\node_modules.bin\codex.cmd (required workaround for Windows path resolution bug present since 2026.5.12) Gateway bind: loopback (127.0.0.1:18789) Node.js: v22.22.2

Consequence:

  • Agent is completely non-functional for interactive use (WhatsApp channel)
  • Scheduled cron jobs that depend on the main agent also fail
  • On 2026.5.22, the event loop stalls for up to 287 seconds per attempt, making the gateway unresponsive during recovery
  • Only workaround is full rollback to 2026.5.12
  • Three consecutive stable releases (5.19, 5.20, 5.22) are affected, suggesting a regression introduced after 5.12 that has not been caught by existing Windows/Codex OAuth test coverage

Workaround: npm install -g [email protected] npm install @openclaw/[email protected] --omit=dev --ignore-scripts --no-audit --no-fund --legacy-peer-deps npm install @openclaw/[email protected] --omit=dev --ignore-scripts --no-audit --no-fund --legacy-peer-deps Restore openclaw.json from pre-upgrade backup and re-apply Codex app-server path fix.

Code Example

Gateway log excerpts from 2026.5.22 (redacted):

--- First message attempt ---
[agent/embedded] strict-agentic execution contract active: runId=b65c232e... provider=openai-codex/gpt-5.5 harness=codex configured=unspecified
[agents/harness] Codex agent harness failed; not falling back to embedded PI backend
[diagnostic] lane task error: lane=main durationMs=7682 error="SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'"
[model-fallback/decision] decision=candidate_failed requested=openai-codex/gpt-5.5 next=anthropic/claude-sonnet-4-6

[diagnostic] lane task error: lane=main durationMs=21532 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"
[model-fallback/decision] decision=candidate_failed requested=openai-codex/gpt-5.5 candidate=anthropic/claude-sonnet-4-6 next=openai/gpt-5

[agent/embedded] strict-agentic execution contract active: provider=openai/gpt-5 harness=codex
[agents/harness] Codex agent harness failed; not falling back to embedded PI backend
[diagnostic] lane task error: error="SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'"
Embedded agent failed before reply: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'

--- Event loop stall (2026.5.22 only) ---
[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu interval=291s eventLoopDelayP99Ms=286957.5 eventLoopDelayMaxMs=286957.5 eventLoopUtilization=1 cpuCoreRatio=1.008
[diagnostic] stalled session: state=processing age=296s reason=active_work_without_progress classification=stalled_agent_run lastProgress=embedded_run:started lastProgressAge=296s recovery=none

--- Known good (2026.5.12) ---
[agent/embedded] strict-agentic execution contract active: provider=openai-codex/gpt-5.5 harness=codex configured=unspecified
[whatsapp] Sent message (reply delivered successfully, no errors)

Versions confirmed affected: 2026.5.19 (a185ca2), 2026.5.20 (e510042), 2026.5.22 (a374c3a)
Last known good: 2026.5.12 (f066dd2)
Rollback to 2026.5.12 resolves the issue immediately.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On Windows with Codex OAuth (openai-codex/gpt-5.5), the Codex agent harness fails on every turn with SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance', causing all three fallback models to fail and the gateway event loop to stall for up to 287 seconds before recovery.

Steps to reproduce

  1. Fresh install of OpenClaw on Windows 11 (native, not WSL2), running as Scheduled Task
  2. Configure main agent with openai-codex/gpt-5.5 (Codex OAuth) as primary model, fallbacks: anthropic/claude-sonnet-4-6 → openai/gpt-5
  3. Install @openclaw/whatsapp and @openclaw/codex manually via npm (Windows npm-bug prevents openclaw plugins install)
  4. Upgrade core to 2026.5.19, 2026.5.20, or 2026.5.22 via: npm install -g openclaw@<version>
  5. Start gateway via gateway-start.cmd
  6. Send any inbound WhatsApp message to the agent
  7. Observe Codex harness failure in gateway log immediately

Expected behavior

Codex harness loads and processes inbound WhatsApp messages successfully, as observed on OpenClaw 2026.5.12 (f066dd2) where provider=openai-codex/gpt-5.5 harness=codex runs without error and replies are delivered within 20-67 seconds.

Actual behavior

On every inbound message, gateway log immediately shows:

[agents/harness] Codex agent harness failed; not falling back to embedded PI backend [diagnostic] lane task error: error="SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'" [model-fallback/decision] decision=candidate_failed requested=openai-codex/gpt-5.5 next=anthropic/claude-sonnet-4-6

Fallback to claude-sonnet-4-6 also fails with EmbeddedAttemptSessionTakeoverError, then gpt-5 fallback hits the same listRegisteredPluginAgentPromptGuidance error. Agent cannot reply. On 2026.5.22, event loop stalls for up to 287 seconds (eventLoopDelayMaxMs=286957ms, eventLoopUtilization=1) before gateway partially recovers. Reproduced consistently on 2026.5.19, 2026.5.20, and 2026.5.22. Not present on 2026.5.12.

OpenClaw version

2026.5.19, 2026.5.20, 2026.5.22 (all affected) — 2026.5.12 is last known good

Operating system

Windows 11 Home (10.0.26200, x64)

Install method

npm install -g openclaw@<version> (manual npm upgrade from 2026.5.12). Gateway runs as Windows Scheduled Task. @openclaw/whatsapp and @openclaw/codex installed manually via npm in ~/.openclaw/npm/ due to Windows npm-bug preventing openclaw plugins install.

Model

openai-codex/gpt-5.5 (primary), fallbacks: anthropic/claude-sonnet-4-6 → openai/gpt-5

Provider / routing chain

openai-codex OAuth (ChatGPT account) → Codex app-server harness → local gateway on 127.0.0.1:18789 → WhatsApp channel inbound

Additional provider/model setup details

agents.defaults.model.primary = openai-codex/gpt-5.5 agents.list[id="main"].model.primary = openai-codex/gpt-5.5 Auth profile: openai-codex:[email protected] (OAuth mode) plugins.entries.codex.config.appServer.command explicitly set to: C:\Users\Openclaw.openclaw\npm\node_modules.bin\codex.cmd (required workaround for Windows path resolution bug present since 2026.5.12) Gateway bind: loopback (127.0.0.1:18789) Node.js: v22.22.2

Logs, screenshots, and evidence

Gateway log excerpts from 2026.5.22 (redacted):

--- First message attempt ---
[agent/embedded] strict-agentic execution contract active: runId=b65c232e... provider=openai-codex/gpt-5.5 harness=codex configured=unspecified
[agents/harness] Codex agent harness failed; not falling back to embedded PI backend
[diagnostic] lane task error: lane=main durationMs=7682 error="SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'"
[model-fallback/decision] decision=candidate_failed requested=openai-codex/gpt-5.5 next=anthropic/claude-sonnet-4-6

[diagnostic] lane task error: lane=main durationMs=21532 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"
[model-fallback/decision] decision=candidate_failed requested=openai-codex/gpt-5.5 candidate=anthropic/claude-sonnet-4-6 next=openai/gpt-5

[agent/embedded] strict-agentic execution contract active: provider=openai/gpt-5 harness=codex
[agents/harness] Codex agent harness failed; not falling back to embedded PI backend
[diagnostic] lane task error: error="SyntaxError: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'"
Embedded agent failed before reply: The requested module 'openclaw/plugin-sdk/plugin-runtime' does not provide an export named 'listRegisteredPluginAgentPromptGuidance'

--- Event loop stall (2026.5.22 only) ---
[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu interval=291s eventLoopDelayP99Ms=286957.5 eventLoopDelayMaxMs=286957.5 eventLoopUtilization=1 cpuCoreRatio=1.008
[diagnostic] stalled session: state=processing age=296s reason=active_work_without_progress classification=stalled_agent_run lastProgress=embedded_run:started lastProgressAge=296s recovery=none

--- Known good (2026.5.12) ---
[agent/embedded] strict-agentic execution contract active: provider=openai-codex/gpt-5.5 harness=codex configured=unspecified
[whatsapp] Sent message (reply delivered successfully, no errors)

Versions confirmed affected: 2026.5.19 (a185ca2), 2026.5.20 (e510042), 2026.5.22 (a374c3a)
Last known good: 2026.5.12 (f066dd2)
Rollback to 2026.5.12 resolves the issue immediately.

Impact and severity

Affected users: Windows users running OpenClaw with Codex OAuth (openai-codex/gpt-5.5) as primary agent model, upgrading from 2026.5.12 to any of 2026.5.19, 2026.5.20, or 2026.5.22.

Severity: Blocks workflow completely. The main agent cannot reply to any inbound messages. All three fallback models also fail due to the same harness error or session takeover errors triggered by the initial failure.

Frequency: Always reproducible. Every inbound message triggers the error. No messages are processed successfully after upgrade.

Consequence:

  • Agent is completely non-functional for interactive use (WhatsApp channel)
  • Scheduled cron jobs that depend on the main agent also fail
  • On 2026.5.22, the event loop stalls for up to 287 seconds per attempt, making the gateway unresponsive during recovery
  • Only workaround is full rollback to 2026.5.12
  • Three consecutive stable releases (5.19, 5.20, 5.22) are affected, suggesting a regression introduced after 5.12 that has not been caught by existing Windows/Codex OAuth test coverage

Additional information

Regression confirmed:

  • Last known good: 2026.5.12 (f066dd2)
  • First known bad: 2026.5.19 (a185ca2)
  • Also confirmed bad: 2026.5.20 (e510042), 2026.5.22 (a374c3a)
  • Versions 2026.5.13 through 2026.5.18 not tested

Workaround: npm install -g [email protected] npm install @openclaw/[email protected] --omit=dev --ignore-scripts --no-audit --no-fund --legacy-peer-deps npm install @openclaw/[email protected] --omit=dev --ignore-scripts --no-audit --no-fund --legacy-peer-deps Restore openclaw.json from pre-upgrade backup and re-apply Codex app-server path fix.

Additional observations:

  • 2026.5.22 introduced a new secondary issue: OpenRouter and LiteLLM pricing fetch both timeout after 60s at every gateway startup, adding ~60s to startup time
  • WhatsApp plugin on 5.19/5.20/5.22 uses Baileys 7.0.0-rc13 which addresses the rc11 spoofing vulnerability (GHSA-qvv5-jq5g-4cgg) — this is a positive change but does not affect the Codex bug
  • The Codex app-server path fix (plugins.entries.codex.config.appServer.command) required since 2026.5.12 on Windows was re-applied before testing — the bug is not caused by a missing path fix

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

Codex harness loads and processes inbound WhatsApp messages successfully, as observed on OpenClaw 2026.5.12 (f066dd2) where provider=openai-codex/gpt-5.5 harness=codex runs without error and replies are delivered within 20-67 seconds.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING