Skip to content

[Bug]: Windows ACP Codex spawn via OpenClaw exits with code 1 while direct acpx codex initializes #60672

@tesforex

Description

@tesforex

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

On Windows with OpenClaw 2026.3.13, sessions_spawn(... runtime:"acp", agentId:"codex") fails with acpx exited with code 1, while direct acpx codex ... commands initialize successfully.

Steps to reproduce

  1. Install OpenClaw 2026.3.13 on Windows.
  2. Enable the acpx plugin.
  3. Configure:
  • acp.allowedAgents = ["codex"]
  • acp.defaultAgent = "codex"
  1. Install Codex ACP:
  • npm install -g @zed-industries/codex-acp
  1. Create ACPX project config at C:\Users\User.openclaw\workspace-jason.acpxrc.json with:
    json
    {
    "agents": {
    "codex": {
    "command": "node C:\Users\User\AppData\Roaming\npm\node_modules\@zed-industries\codex-acp\bin\codex-acp.js"
    }
    }
    }

  2. Confirm gateway log shows:

  • acpx runtime backend ready
  1. Trigger an OpenClaw ACP Codex run via agent/session spawn:
  • observed from assistant-side sessions_spawn(runtime:"acp", agentId:"codex", ...)
  1. Observe failure:
  • acpx exited with code 1

Expected behavior

After acpx runtime backend ready and successful direct acpx codex initialization, an OpenClaw ACP Codex run should start successfully instead of exiting with code 1.

Actual behavior

OpenClaw ACP Codex runs fail with:

  • acpx exited with code 1

At the same time, direct ACPX commands succeed further:

  • acpx codex sessions new --name test-codex returns without error
  • acpx codex exec "Inspect the drayageconnection project and summarize it briefly." prints:
  • [client] initialize (running)

OpenClaw version

2026.3.13 (61d171a)

Operating system

Windows 11

Install method

npm global

Model

openai-codex/gpt-5.4

Provider / routing chain

openclaw -> openai-codex/gpt-5.4

Additional provider/model setup details

  • acpx plugin status: loaded

  • acp.allowedAgents:
    json
    ["codex"]

  • acp.defaultAgent:
    text
    codex

  • Gateway log previously showed ACPX runtime healthy:

  • acpx runtime backend ready

Logs, screenshots, and evidence

Relevant observed evidence:

text
acpx runtime backend ready


text
sessions_spawn(... runtime:"acp", agentId:"codex" ...) -> acpx exited with code 1


text
C:\Users\User\AppData\Roaming\npm\node_modules\openclaw\extensions\acpx\node_modules\.bin\acpx.cmd --cwd C:\Users\User\.openclaw\workspace-jason codex sessions new --name test-codex

Result:
text
(no error output; command returned to prompt)


text
C:\Users\User\AppData\Roaming\npm\node_modules\openclaw\extensions\acpx\node_modules\.bin\acpx.cmd --cwd C:\Users\User\.openclaw\workspace-jason codex exec "Inspect the drayageconnection project and summarize it briefly."

Result:
text
[client] initialize (running)


Earlier Windows-specific spawn evidence before switching the ACPX agent command to direct node ...codex-acp.js:

text
spawn EINVAL


Codex ACP wrapper path inspection:

text
C:\Users\User\AppData\Roaming\npm\codex-acp.cmd
C:\Users\User\AppData\Roaming\npm\codex-acp.ps1
C:\Users\User\AppData\Roaming\npm\node_modules\@zed-industries\codex-acp\bin\codex-acp.js

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions