openclaw - ✅(Solved) Fix [Bug]: ACPX Codex worker fails when model/thinking overrides are configured [1 pull requests, 2 comments, 2 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#74305Fetched 2026-04-30 06:25:49
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
2
Author
Timeline (top)
commented ×2cross-referenced ×2labeled ×2

Codex ACP worker runs succeed without internal model/thinking overrides, but fail with AcpRuntimeError: Internal error when model and model_reasoning_effort overrides are passed to codex-acp.

Error Message

Observed OpenClaw log line:

[ws] ⇄ res ✗ agent errorCode=UNAVAILABLE errorMessage=AcpRuntimeError: Internal error runId=f1b71913-b95d-4dea-a691-97596b7af9f6 error=AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

ACP stream log contained only lifecycle start/error events:

phase: start

phase: error

error: Internal error

No child transcript file was created for the failed ACP session.

Root Cause

Severity: Medium-high, because ACPX works only when the child model/thinking overrides are omitted.

Fix Action

Fixed

PR fix notes

PR #74339: fix(acpx): prevent duplicate -c config overrides for Codex ACP command

Description (problem / solution / changelog)

Root Cause

When a user configures the ACPX Codex command with -c model=gpt-5.5 -c model_reasoning_effort=medium, and the runtime model override scope is active (e.g. via sessions_spawn with model/thinking), appendCodexAcpConfigOverrides blindly appended additional -c args to the command string without checking if those keys were already present. This caused duplicate -c model=... / -c model_reasoning_effort=... args to be passed to the codex-acp adapter.

Additionally, on v2026.4.26 (the reported version), the older wrapper code and codex-acp 0.11.x dependency had different arg handling that contributed to the failure. Current main already improved the wrapper normalization and upgraded to codex-acp 0.12.0, but the duplicate-append issue remained.

Changes

  • extensions/acpx/src/runtime.ts: Add commandHasConfigKey() that checks if a command string already contains a -c <key>=... arg. Modified appendCodexAcpConfigOverrides() to skip appending a -c override if that config key is already present in the command string, preventing duplication.

  • extensions/acpx/src/runtime.test.ts: Added tests covering:

    • Configured command with both -c model and -c model_reasoning_effort is not duplicated
    • Partial overlap: only missing keys are appended
    • Wrapper command variant with pre-existing -c args
    • commandHasConfigKey utility behavior
    • The #74305 scenario: configured command with -c overrides, no runtime model passed

Fixes #74305

Changed files

  • extensions/acpx/src/runtime.test.ts (modified, +94/-0)
  • extensions/acpx/src/runtime.ts (modified, +18/-2)

Code Example

Observed OpenClaw log line:

[ws] ⇄ res ✗ agent errorCode=UNAVAILABLE errorMessage=AcpRuntimeError: Internal error runId=f1b71913-b95d-4dea-a691-97596b7af9f6 error=AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

ACP stream log contained only lifecycle start/error events:

phase: start

phase: error

error: Internal error

No child transcript file was created for the failed ACP session.
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

Codex ACP worker runs succeed without internal model/thinking overrides, but fail with AcpRuntimeError: Internal error when model and model_reasoning_effort overrides are passed to codex-acp.

Steps to reproduce

  1. Start OpenClaw 2026.4.26 with ACPX enabled and Codex configured as an ACP agent.
  2. Configure the ACPX Codex command to run codex-acp with -c model=gpt-5.5 -c model_reasoning_effort=medium.
  3. From an OpenClaw agent, call sessions_spawn with runtime: "acp", agentId: "codex", mode: "run", and streamTo: "parent".
  4. Ask the ACP worker to perform a web research task.
  5. Observe the spawned ACP task fail with AcpRuntimeError: Internal error.

Expected behavior

The Codex ACP worker should run successfully with supported model/thinking overrides, or return a specific validation error if those overrides are unsupported.

Actual behavior

The ACP worker fails with AcpRuntimeError: Internal error; the ACP stream log only records lifecycle start/error events, and no child transcript file is created.

OpenClaw version

2026.4.26 (be8c246)

Operating system

Linux 6.17.0-1011-azure x64, Node 22.22.2

Install method

npm global: /home/azureuser/.npm-global/bin/openclaw

Model

Override under test: gpt-5.5 with model_reasoning_effort=medium

Provider / routing chain

OpenClaw agent -> ACPX plugin -> @zed-industries/codex-acp@^0.11.1 -> Codex CLI

Additional provider/model setup details

ACPX Codex command used shared Codex auth via CODEX_HOME=/home/azureuser/.codex.

ACPX config included permissionMode: "approve-all" and nonInteractivePermissions: "fail".

Direct Codex CLI sanity checks with -c model=gpt-5.5 -c model_reasoning_effort=medium succeeded on the same VM/auth setup.

Removing the model/thinking overrides from the ACPX Codex command allowed the ACP worker flow to work again.

Logs, screenshots, and evidence

Observed OpenClaw log line:

[ws] ⇄ res ✗ agent errorCode=UNAVAILABLE errorMessage=AcpRuntimeError: Internal error runId=f1b71913-b95d-4dea-a691-97596b7af9f6 error=AcpRuntimeError: Internal error: code=ACP_TURN_FAILED

ACP stream log contained only lifecycle start/error events:

phase: start

phase: error

error: Internal error

No child transcript file was created for the failed ACP session.

Impact and severity

Affected: ACPX Codex worker runs where the operator wants to control the child Codex model/thinking level.

Severity: Medium-high, because ACPX works only when the child model/thinking overrides are omitted.

Frequency: Observed on the tested ACPX Codex spawn attempts with model/thinking overrides configured.

Consequence: Operators cannot reliably configure the internal Codex ACP model/thinking level for spawned ACP workers.

Additional information

The same ACP workflow works after removing -c model=gpt-5.5 -c model_reasoning_effort=medium from the ACPX Codex command.

extent analysis

TL;DR

The ACP worker fails with an AcpRuntimeError: Internal error when model and model reasoning effort overrides are passed to codex-acp, suggesting a compatibility issue with the specified model and reasoning effort.

Guidance

  • Verify that the gpt-5.5 model and model_reasoning_effort=medium are supported by the codex-acp version being used (@zed-industries/codex-acp@^0.11.1).
  • Check the codex-acp documentation for any specific requirements or restrictions on using model and reasoning effort overrides.
  • Test the ACP worker with different model and reasoning effort combinations to isolate the issue.
  • Consider updating the codex-acp version to a newer release, if available, to ensure compatibility with the latest models and features.

Example

No code snippet is provided as the issue is related to configuration and compatibility rather than code.

Notes

The issue may be specific to the gpt-5.5 model and model_reasoning_effort=medium combination, and further testing is needed to determine the root cause.

Recommendation

Apply a workaround by removing the model and reasoning effort overrides from the ACPX Codex command, as this has been shown to allow the ACP worker flow to work again. This will allow operators to use the ACPX Codex worker, although without the desired model and reasoning effort controls.

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

The Codex ACP worker should run successfully with supported model/thinking overrides, or return a specific validation error if those overrides are unsupported.

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 - ✅(Solved) Fix [Bug]: ACPX Codex worker fails when model/thinking overrides are configured [1 pull requests, 2 comments, 2 participants]