openclaw - 💡(How to fix) Fix [Bug]: Gateway restart during active embedded Codex WebChat turn drops final reply and only logs client closed before turn completed

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…

When a WebChat direct conversation is using the bundled Codex harness and the Gateway restarts during an active turn, the in-flight embedded Codex turn is aborted before turn/completed. WebChat reconnects, but the user gets no visible final assistant reply or explicit interruption notice for the interrupted turn.

Root Cause

When a WebChat direct conversation is using the bundled Codex harness and the Gateway restarts during an active turn, the in-flight embedded Codex turn is aborted before turn/completed. WebChat reconnects, but the user gets no visible final assistant reply or explicit interruption notice for the interrupted turn.

Code Example

Observed repeatedly in the same day of testing. Representative log pattern:
- Embedded agent failed before reply: codex app-server client closed before turn completed
- immediately followed by WebChat disconnect code=1012 reason=service restart

Representative timestamps from one reproduction day included 2026-05-28 12:25:45 PDT, 12:51:26 PDT, 13:57:16 PDT, 14:08:46 PDT, 15:14:19 PDT, and 15:29:29 PDT.

Related note: transcript entries whose whole visible text is NO_REPLY appear to be normal internal silent-turn behavior and do not appear to be the primary user-facing failure here.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When a WebChat direct conversation is using the bundled Codex harness and the Gateway restarts during an active turn, the in-flight embedded Codex turn is aborted before turn/completed. WebChat reconnects, but the user gets no visible final assistant reply or explicit interruption notice for the interrupted turn.

Steps to reproduce

  1. Start OpenClaw 2026.5.27 with the bundled codex plugin enabled and use a WebChat direct conversation routed through the Codex runtime.
  2. Send a prompt that keeps the turn active long enough to perform tool calls or extended verification work.
  3. While that turn is still running, trigger a Gateway restart from another terminal, for example openclaw gateway restart, or apply a config/plugin change that restarts the service.
  4. Let WebChat reconnect and inspect the conversation plus Gateway logs.

Expected behavior

The interrupted turn should either finish with a visible assistant reply after reconnect, or WebChat should show an explicit user-visible interruption/failure message for that turn. A restart should not make the turn appear to silently vanish.

Actual behavior

The Gateway log records Embedded agent failed before reply: codex app-server client closed before turn completed, followed by a WebChat disconnect with code 1012 (service restart). After reconnect, the interrupted turn has no visible final assistant reply in WebChat, so the user has to send another message to learn whether work completed or failed.

OpenClaw version

2026.5.27 (27ae826)

Operating system

Ubuntu 26.04 LTS

Install method

pnpm

Model

openai/gpt-5.5 (also observed while the session fallback/runtime surface remained Codex-backed)

Provider / routing chain

OpenAI model routed through the bundled Codex harness / embedded Codex app-server in a WebChat direct chat

Additional provider/model setup details

Bundled codex plugin enabled. WebChat direct conversation. Gateway auth configured with token mode. The issue was reproduced during normal CLI-driven Gateway restarts while troubleshooting plugin/config changes.

Logs, screenshots, and evidence

Observed repeatedly in the same day of testing. Representative log pattern:
- Embedded agent failed before reply: codex app-server client closed before turn completed
- immediately followed by WebChat disconnect code=1012 reason=service restart

Representative timestamps from one reproduction day included 2026-05-28 12:25:45 PDT, 12:51:26 PDT, 13:57:16 PDT, 14:08:46 PDT, 15:14:19 PDT, and 15:29:29 PDT.

Related note: transcript entries whose whole visible text is NO_REPLY appear to be normal internal silent-turn behavior and do not appear to be the primary user-facing failure here.

Impact and severity

Medium to high for operator trust and troubleshooting. The user can reasonably believe the assistant stopped responding or finished early, even though the actual failure is an interrupted embedded Codex turn during restart. This is especially painful during upgrades, config fixes, plugin changes, or any workflow that legitimately requires restarts while testing.

Additional information

This appears narrower than a generic WebChat disconnect problem. The strongest confirmed chain is: active embedded Codex turn -> Gateway restart -> Codex app-server client closes before turn/completed -> WebChat reconnects without a visible terminal message for that interrupted turn. The user-facing gap is the missing visible handoff/failure notice after reconnect.

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 interrupted turn should either finish with a visible assistant reply after reconnect, or WebChat should show an explicit user-visible interruption/failure message for that turn. A restart should not make the turn appear to silently vanish.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING