openclaw - 💡(How to fix) Fix [Bug]: Codex ACP falls back to `npm exec` (`acpx` bundle issue) [1 comments, 1 participants]

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…
GitHub stats
openclaw/openclaw#72037Fetched 2026-04-27 05:35:46
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×1cross-referenced ×1

On my openclaw 2026.4.24, every Codex ACP startup shells out through npm exec rather than running the package's own binary. @zed-industries/codex-acp dep is not present so the npx fallback fires and adds significant SD Card IO load on my Raspberry Pi 500.

Root Cause

On my openclaw 2026.4.24, every Codex ACP startup shells out through npm exec rather than running the package's own binary. @zed-industries/codex-acp dep is not present so the npx fallback fires and adds significant SD Card IO load on my Raspberry Pi 500.

Code Example

ACP_SESSION_INIT_FAILED
ACP agent exited before initialize completed (exit=127, signal=null):
sh: 1: codex-acp: Permission denied
agentCommand: npx @zed-industries/codex-acp@^0.11.1

---

$ find ~/.npm-global/lib/node_modules/openclaw/node_modules/@zed-industries/codex-acp 2>/dev/null
$ find ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-30062883dcaf/node_modules/@zed-industries/codex-acp 2>/dev/null
$
RAW_BUFFERClick to expand / collapse

Bug type

Bug (packaging regression in acpx?)

Beta release blocker

No

Summary

On my openclaw 2026.4.24, every Codex ACP startup shells out through npm exec rather than running the package's own binary. @zed-industries/codex-acp dep is not present so the npx fallback fires and adds significant SD Card IO load on my Raspberry Pi 500.

Steps to reproduce

  1. Install openclaw 2026.4.24 fresh via npm install -g openclaw@latest.
  2. Configure acp.enabled = true and acp.backend = "acpx" in openclaw.json.
  3. Trigger a Codex ACP session from a Discord channel.
  4. Watch ps/pstree and/or the gateway journal.

Expected behaviour

The Codex ACP child process uses the bundled @zed-industries/codex-acp binary and starts directly. Startup time is quick. No npm/npx cache work.

Actual behaviour

The Codex ACP child is sh -c 'npm exec --yes --package=@zed-industries/codex-acp@^0.11.1 -- codex-acp' or npx @zed-industries/codex-acp@^0.11.1

It also makes Codex ACP startup dependent on npm/npx cache state so ACP startup failed with:

ACP_SESSION_INIT_FAILED
ACP agent exited before initialize completed (exit=127, signal=null):
sh: 1: codex-acp: Permission denied
agentCommand: npx @zed-industries/codex-acp@^0.11.1

OpenClaw version

2026.4.24 (also in 2026.4.23).

acpx: 0.5.3 @zed-industries/codex-acp: ^0.11.1 per prompt-turn-CXMtXBl-.js:16 codex-cli: 0.125.0

Logs, screenshots, and evidence

Bundled dep absent on my install:

$ find ~/.npm-global/lib/node_modules/openclaw/node_modules/@zed-industries/codex-acp 2>/dev/null
$ find ~/.openclaw/plugin-runtime-deps/openclaw-2026.4.24-30062883dcaf/node_modules/@zed-industries/codex-acp 2>/dev/null
$

Impact and severity

Affected: any deployment using acp.backend = "acpx" with the codex agent where @zed-industries/codex-acp is not separately installed adjacent to acpx. On constrained hardware (Raspberry Pi 500 with all paths on SD card) the npm/npx work and the native binary load piles onto session-store I/O.

Severity: medium - costly and brittle during startup on hardware like Raspberry Pi 500. Frequency: every Codex ACP session start. Consequence: startup latency, dependency on a multi-GB cache, and (Permission denied) failures.

Additional information

I set plugins.entries.acpx.config.agents.codex.command in openclaw.json to node /home/username/.openclaw/acpx/codex-acp-wrapper.mjs, where the wrapper directly spawns the existing 0.11.1 native binary out of ~/.npm/_npx/<hash>/node_modules/@zed-industries/codex-acp-linux-arm64/bin/codex-acp and preserves the existing CODEX_HOME bridge. This is fragile but works for me for now.

extent analysis

TL;DR

The issue can be fixed by ensuring the @zed-industries/codex-acp dependency is properly bundled with the openclaw package or installed separately.

Guidance

  • Verify that the @zed-industries/codex-acp package is installed and bundled correctly with openclaw by checking the node_modules directory.
  • Check the openclaw.json configuration file to ensure that the acp.backend is set to "acpx" and the plugins.entries.acpx.config.agents.codex.command is set to use the bundled binary.
  • Consider installing @zed-industries/codex-acp separately using npm install to ensure it is available and up-to-date.
  • Monitor the startup process and logs to ensure that the Codex ACP child process is using the bundled binary and not relying on npm exec or npx.

Example

No code snippet is provided as the issue is related to package installation and configuration.

Notes

The issue seems to be related to a packaging regression in acpx, and the provided workaround using a custom codex-acp-wrapper.mjs script may not be a reliable long-term solution.

Recommendation

Apply a workaround by installing @zed-industries/codex-acp separately using npm install to ensure it is available and up-to-date, until the packaging issue is resolved.

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

openclaw - 💡(How to fix) Fix [Bug]: Codex ACP falls back to `npm exec` (`acpx` bundle issue) [1 comments, 1 participants]