openclaw - 💡(How to fix) Fix Codex app-server no-tool turns can time out after reasoning before turn completion [1 pull requests]

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…

A native Codex app-server turn can emit reasoning or commentary progress, then never send turn/completed. In the automatic assistant-reply path, OpenClaw currently falls back to the short completion-idle guard and surfaces:

Codex stopped before confirming the turn was complete. The response may be incomplete; retry if needed.

This is adjacent to #88196 but not the same post-tool shape. PR #88321 addresses post-tool continuation after a tool handoff; the live failures below had no tool.call / tool.result events recorded.

Error Message

session.ended: status=error, promptError="codex app-server turn idle timed out waiting for turn/completed"

Root Cause

A native Codex app-server turn can emit reasoning or commentary progress, then never send turn/completed. In the automatic assistant-reply path, OpenClaw currently falls back to the short completion-idle guard and surfaces:

Codex stopped before confirming the turn was complete. The response may be incomplete; retry if needed.

This is adjacent to #88196 but not the same post-tool shape. PR #88321 addresses post-tool continuation after a tool handoff; the live failures below had no tool.call / tool.result events recorded.

Fix Action

Fixed

Code Example

Codex stopped before confirming the turn was complete. The response may be incomplete; retry if needed.

---

2026-05-30T11:57:00.074Z
kind: turn_completion_idle_timeout
idleMs: 60002
timeoutMs: 60000
lastActivityReason: notification:rawResponseItem/completed
lastNotificationMethod: rawResponseItem/completed
lastNotificationItemType: reasoning

2026-05-30T12:00:07.026Z
kind: turn_completion_idle_timeout
idleMs: 60001
timeoutMs: 60000
lastActivityReason: notification:item/completed
lastNotificationMethod: item/completed
note: Codex emitted a commentary agent_message about 60s earlier, then no final turn completion

2026-05-30T12:37:44.021Z
kind: turn_completion_idle_timeout
idleMs: 60004
timeoutMs: 60000
lastActivityReason: notification:item/completed
lastNotificationMethod: item/completed

---

model.completed: timedOut=true, aborted=true, promptError="codex app-server attempt timed out", assistantTextCount=0
session.ended: status=error, promptError="codex app-server turn idle timed out waiting for turn/completed"
RAW_BUFFERClick to expand / collapse

Summary

A native Codex app-server turn can emit reasoning or commentary progress, then never send turn/completed. In the automatic assistant-reply path, OpenClaw currently falls back to the short completion-idle guard and surfaces:

Codex stopped before confirming the turn was complete. The response may be incomplete; retry if needed.

This is adjacent to #88196 but not the same post-tool shape. PR #88321 addresses post-tool continuation after a tool handoff; the live failures below had no tool.call / tool.result events recorded.

Environment

  • OpenClaw: 2026.5.27 (27ae826)
  • Codex plugin/package: @openclaw/[email protected]
  • Runtime/provider: openai-codex
  • Model: gpt-5.5
  • Surface: Discord interactive channel turn

Observed Behavior

A normal Discord turn asking for image/avatar work failed three times in the same app-server thread. The app-server produced reasoning and, on one retry, a short commentary assistant message, but OpenClaw never observed turn/completed before the completion-idle watchdog fired.

Sanitized telemetry:

2026-05-30T11:57:00.074Z
kind: turn_completion_idle_timeout
idleMs: 60002
timeoutMs: 60000
lastActivityReason: notification:rawResponseItem/completed
lastNotificationMethod: rawResponseItem/completed
lastNotificationItemType: reasoning

2026-05-30T12:00:07.026Z
kind: turn_completion_idle_timeout
idleMs: 60001
timeoutMs: 60000
lastActivityReason: notification:item/completed
lastNotificationMethod: item/completed
note: Codex emitted a commentary agent_message about 60s earlier, then no final turn completion

2026-05-30T12:37:44.021Z
kind: turn_completion_idle_timeout
idleMs: 60004
timeoutMs: 60000
lastActivityReason: notification:item/completed
lastNotificationMethod: item/completed

The corresponding attempt summaries had:

model.completed: timedOut=true, aborted=true, promptError="codex app-server attempt timed out", assistantTextCount=0
session.ended: status=error, promptError="codex app-server turn idle timed out waiting for turn/completed"

Expected Behavior

Once Codex has emitted current-turn reasoning or non-final assistant commentary, OpenClaw should give the app-server the existing post-reasoning reply window to finish the final assistant response, not immediately revert to the generic short completion-idle guard.

Accepted turns with no progress should still fail fast on appServer.turnCompletionIdleTimeoutMs.

Relationship To #88196 / #88321

  • #88196 is the original post-tool cron/app-server timeout report.
  • #88321 fixes post-tool continuation by applying the longer post-tool budget after tool handoff states.
  • This issue tracks the sibling no-tool reasoning/commentary continuation path observed during live Discord use.

Suggested Fix

Use the existing post-reasoning reply guard for automatic assistant delivery too, not only sourceReplyDeliveryMode: "message_tool_only", and preserve the short guard for accepted turns that never produce reasoning, assistant progress, or tool activity.

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 app-server no-tool turns can time out after reasoning before turn completion [1 pull requests]