openclaw - 💡(How to fix) Fix Codex plugin: `turn released after completed assistant item without terminal event` causes stuck session

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…

After several bash tool calls in a single turn, the @openclaw/codex plugin emits codex app-server turn released after completed assistant item without terminal event and the session becomes permanently stalled (no progress, no output to the user, no recovery without gateway restart).

Root Cause

After several bash tool calls in a single turn, the @openclaw/codex plugin emits codex app-server turn released after completed assistant item without terminal event and the session becomes permanently stalled (no progress, no output to the user, no recovery without gateway restart).

Fix Action

Workaround

A systemd-user watcher that greps the journal for the warning and restarts the gateway on first hit (with cooldown). Restart unblocks; the affected turn is lost but the next turn works.

Code Example

[agent/embedded] codex app-server turn released after completed assistant item without terminal event
[diagnostic] stalled session: sessionId=... state=processing age=171s
             queueDepth=1 reason=active_work_without_progress
             activeWorkKind=model_call lastProgress=model_call:started
             lastProgressAge=171s recovery=none
RAW_BUFFERClick to expand / collapse

Summary

After several bash tool calls in a single turn, the @openclaw/codex plugin emits codex app-server turn released after completed assistant item without terminal event and the session becomes permanently stalled (no progress, no output to the user, no recovery without gateway restart).

Environment

  • OpenClaw: 2026.5.12 (f066dd2) (npm openclaw@latest)
  • @openclaw/codex: 2026.5.12
  • @openai/codex: 0.130.0
  • Node: v24.15.0
  • OS: Zorin OS 18.1 (Ubuntu 24.04 base), Linux 6.17 x86_64
  • Runtime: gateway via systemd --user, native install (not Docker)
  • Agent: default main, runtime codex
  • Model: openai/gpt-5 (also reproduced with openai/gpt-5.5)
  • Channels where I noticed it: Telegram and WhatsApp

Reproduction

  1. User sends a question that the agent answers by collecting host info via many bash tool calls in sequence (e.g. "give me a hardware summary").
  2. Agent successfully runs ~10–15 bash calls (uname, lscpu, free, etc.).
  3. Assistant emits a final text reply ("Vou te enviar um resumo agora.") then the Codex app-server fires the warning above; no terminal event follows.
  4. The pending reply never reaches the user; the session stays in state=processing and gateway logs show repeated stalled session ... active_work_without_progress until the gateway is restarted.

Frequency: intermittent but reliable on long turns; happens ~1 in 3 long sessions.

Gateway log excerpt

[agent/embedded] codex app-server turn released after completed assistant item without terminal event
[diagnostic] stalled session: sessionId=... state=processing age=171s
             queueDepth=1 reason=active_work_without_progress
             activeWorkKind=model_call lastProgress=model_call:started
             lastProgressAge=171s recovery=none

Workaround

A systemd-user watcher that greps the journal for the warning and restarts the gateway on first hit (with cooldown). Restart unblocks; the affected turn is lost but the next turn works.

Expected

The Codex app-server should always emit a terminal event when the assistant item completes, even if there's nothing more to do, so the gateway can flush the reply and release the session. Alternatively, OpenClaw could auto-recover the stuck session without requiring a full gateway restart.

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 Codex plugin: `turn released after completed assistant item without terminal event` causes stuck session