openclaw - ✅(Solved) Fix [Bug]: Codex ACP Discord thread sessions can fail first turn or keep replies local [1 pull requests, 1 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#80079Fetched 2026-05-11 03:18:59
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Author
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

Codex ACP sessions in Discord thread flows can fail on the first spawned turn or produce a child reply that stays in the ACP transcript instead of being posted back into the bound Discord thread.

Root Cause

Observed behavior before the local fix set:

  • a bound Discord Codex thread session produced the child reply yo in the ACP session transcript, but nothing was posted back into Discord
  • the spawn path required moving sessions.patch until after ACP runtime initialization because patching first could write back a cached session entry without entry.acp, which then broke the first spawned turn with ACP metadata is missing

Fix Action

Fix / Workaround

  1. Run OpenClaw 2026.5.7 on Linux/WSL2 with ACP agent codex enabled.
  2. From a Discord channel/thread session, spawn a Codex ACP run.
  3. Observe either of these paths:
    • the first spawned turn fails when the gateway session store is patched before ACP runtime metadata is written, leaving entry.acp missing for the first turn
    • the ACP child produces output, but the bound Discord thread does not receive the visible reply even though the ACP session transcript contains the child message

Observed behavior before the local fix set:

  • a bound Discord Codex thread session produced the child reply yo in the ACP session transcript, but nothing was posted back into Discord
  • the spawn path required moving sessions.patch until after ACP runtime initialization because patching first could write back a cached session entry without entry.acp, which then broke the first spawned turn with ACP metadata is missing

PR fix notes

PR #80195: fix #80079: [Bug]: Codex ACP Discord thread sessions can fail first turn or keep replies local

Description (problem / solution / changelog)

Summary

Fixes #80079

Issue

[Bug]: Codex ACP Discord thread sessions can fail first turn or keep replies local

Changes

  • fix(acp): require meaningful ACP stream output
  • fix(acp): repair codex thread spawns

Changed Files

CHANGELOG.md                                 |  1 +
 src/acp/control-plane/manager.core.ts        |  4 +-
 src/acp/control-plane/manager.test.ts        | 74 +++++++++++++++++++++++++++-
 src/acp/control-plane/manager.turn-stream.ts | 16 +++++-
 src/agents/acp-spawn.test.ts                 | 10 ++++
 src/agents/acp-spawn.ts                      | 23 ++++-----
 6 files changed, 113 insertions(+), 15 deletions(-)

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/acp/control-plane/manager.core.ts (modified, +3/-1)
  • src/acp/control-plane/manager.test.ts (modified, +111/-2)
  • src/acp/control-plane/manager.turn-stream.ts (modified, +15/-1)
  • src/agents/acp-spawn.test.ts (modified, +125/-0)
  • src/agents/acp-spawn.ts (modified, +30/-12)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Codex ACP sessions in Discord thread flows can fail on the first spawned turn or produce a child reply that stays in the ACP transcript instead of being posted back into the bound Discord thread.

Steps to reproduce

  1. Run OpenClaw 2026.5.7 on Linux/WSL2 with ACP agent codex enabled.
  2. From a Discord channel/thread session, spawn a Codex ACP run.
  3. Observe either of these paths:
    • the first spawned turn fails when the gateway session store is patched before ACP runtime metadata is written, leaving entry.acp missing for the first turn
    • the ACP child produces output, but the bound Discord thread does not receive the visible reply even though the ACP session transcript contains the child message

Expected behavior

Codex ACP spawn should initialize ACP metadata before the first turn, ACP turn completion should tolerate adapters that close the stream after output without a terminal done event, and bound Discord thread sessions should post the child reply back into the originating thread automatically.

Actual behavior

Observed behavior before the local fix set:

  • a bound Discord Codex thread session produced the child reply yo in the ACP session transcript, but nothing was posted back into Discord
  • the spawn path required moving sessions.patch until after ACP runtime initialization because patching first could write back a cached session entry without entry.acp, which then broke the first spawned turn with ACP metadata is missing

OpenClaw version

2026.5.7 (eeef486)

Operating system

Linux 6.6.114.1-microsoft-standard-WSL2

Install method

npm global gateway/runtime with a local source checkout at ~/.openclaw/workspace/openclaw

Model

openai-codex/gpt-5.4

Provider / routing chain

openai-codex oauth

Additional provider/model setup details

ACP agent under test was codex. Local verification used source commits fd4757d1796c15cc7c21ec049c3565c5b5c8ea01 and 1d644f8000feb07c3cf4dee81d892ea9b0a51172 in the workspace checkout.

Logs, screenshots, and evidence

Impact and severity

Affected users/systems/channels: Discord users running bound ACP Codex thread sessions Severity: blocks visible thread replies and can break the first spawned turn Frequency: reproduced in the observed Discord thread case and covered by deterministic regression tests for the fixed paths Consequence: spawned ACP sessions can appear silent in Discord or fail before the first useful reply is delivered

Additional information

NOT_ENOUGH_INFO

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 ACP spawn should initialize ACP metadata before the first turn, ACP turn completion should tolerate adapters that close the stream after output without a terminal done event, and bound Discord thread sessions should post the child reply back into the originating thread automatically.

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]: Codex ACP Discord thread sessions can fail first turn or keep replies local [1 pull requests, 1 comments, 2 participants]