Repository navigation
Description
Summary
OpenClaw 2026.6.1 / Codex app-server can stall after an inter-session sessions_send delegation times out. In the observed incident, the target session had already received a completed tool result, then remained stuck in model_call with no further assistant output or error. The caller then blocked on sessions_history. Other unrelated Codex sessions also stopped making progress.
Environment
- OpenClaw: 2026.6.1
- Runtime: OpenAI Codex
- Model:
openai/gpt-5.5 - Model API:
openai-chatgpt-responses - Deployment: Docker container on NAS
- Node runtime in logs: 24.16.0
What happened
An agent delegated a task to another configured agent via sessions_send. The target agent did useful work and completed local tool calls, but after the final bash tool result the Codex app-server did not produce any next assistant item. Later diagnostics showed the target stuck in model_call. The requester also became stuck while waiting on sessions_history.
After this, multiple independent sessions also showed stale active work.
Timeline / Evidence
Times below are Asia/Shanghai on 2026-06-05.
-
18:18:24gateway log:- subsystem:
agent/embedded - message:
codex dynamic tool call timed out - tool:
sessions_send - timeout:
90000ms
- subsystem:
-
Target session trajectory:
- session key: target agent main session
18:18:19:bashtool result completed successfully after reading trip index18:18:28: nextbashtool call started18:18:32:bashtool result completed successfully after reading a memory file- after that: no assistant output, no error, no final result
-
18:28:59diagnostic:- requester session stalled
- classification:
blocked_tool_call - active tool:
sessions_history - active tool age: ~622s
-
18:30:20diagnostic:- target session stalled
- classification:
stalled_agent_run - active work:
model_call - last progress:
codex_app_server:request:item/tool/call:response - last progress age: ~604s
-
18:30:20diagnostic also reported unrelated sessions stalled:- another agent session stalled in
model_call - a cron-backed main session stalled in
bash
- another agent session stalled in
This suggests the failure is broader than the original sessions_send call and may involve Codex app-server/runtime progress handling.
Expected behavior
sessions_sendtimeout should cleanly fail the caller.- If the target run is still active after the caller times out, it should either continue independently or be cancelled/marked failed, but it should not leave the caller blocked on
sessions_history. model_callshould have a hard timeout or recovery path.- Stalled-session diagnostics should be able to abort/recover stuck runs, not only warn.
- One stuck inter-session delegation should not stall unrelated sessions.
Actual behavior
sessions_sendtimed out.- The requester later remained stuck in
sessions_history. - The target remained stuck in
model_callafter a completed tool result. - Other sessions also stopped making progress.
- Recovery required gateway/container restart.
Mitigation applied locally
As a temporary workaround:
- disabled gateway-level
sessions_send - reduced default run timeout from 86400s to 900s
- reduced default agent concurrency from 3 to 2
- avoided cross-agent delegation and handled lookups in the current session directly
Requested fixes
- Add/enforce a hard timeout and cancellation path for Codex
model_call. - Ensure
sessions_sendtimeout cancels or detaches the target safely and releases the caller. - Avoid synchronous caller blocking on target
sessions_historyafter delegation timeout. - Add recovery/abort behavior to stalled-session detector.
- Ensure a stalled run cannot block unrelated sessions in the app-server/runtime dispatcher.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 5, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 21, 2026, 2:27 PM ET / 18:27 UTC.
Summary
Keep open: current main has partial Codex idle-timeout and stuck-recovery mitigations, but the reported inter-session timeout, caller release, target recovery, sessions_history behavior, and unrelated-session isolation are not fully proven fixed.
Reproducibility: no. there is credible source and issue-comment evidence for the remaining failure family, but no high-confidence live current-main reproduction of the full process-wide Codex stall was established.
Ways to help us reproduce this
Next step
Manual review is needed because the remaining work spans Codex protocol/runtime behavior, sessions_send timeout semantics, diagnostic recovery policy, and live repro requirements.
Review details
Best possible solution:
Keep the umbrella open until maintainers reconcile the focused timeout, Codex interrupt, and diagnostic-recovery fixes, then verify a live Codex inter-session timeout no longer wedges caller, target, or unrelated sessions.
Do we have a high-confidence way to reproduce the issue?
No; there is credible source and issue-comment evidence for the remaining failure family, but no high-confidence live current-main reproduction of the full process-wide Codex stall was established.
Is this the best way to solve the issue?
Unclear as one narrow fix; the best path needs maintainer agreement on sessions_send timeout semantics plus Codex interrupt and diagnostic recovery behavior before closure.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against bda05dbc2f15.
Label changes
Label justifications:
P1: The issue describes a shipped Codex runtime stall that blocked agent work across sessions and required gateway or container restart.impact:session-state: The requester, target, and unrelated sessions can remain in stale active-work or recovery states after the timeout.impact:message-loss: The target produced no final assistant output after completed tool results, and a related comment reports an interrupted command result.impact:crash-loop: The reported recovery required restarting the gateway/container and affected process-level session availability.Evidence reviewed
Acceptance criteria:
What I checked:
src/agents/tools/sessions-send-tool.ts:705, bda05dbc2f15)src/agents/run-wait.ts:263, bda05dbc2f15)src/agents/tools/sessions-send-tool.a2a.ts:91, bda05dbc2f15)extensions/codex/src/app-server/attempt-turn-watches.ts:331, bda05dbc2f15)src/agents/embedded-agent-runner/run/codex-app-server-recovery.ts:19, bda05dbc2f15)Likely related people:
src/agents/tools/sessions-send-tool.ts,src/logging/diagnostic-stuck-session-recovery.runtime.ts)src/agents/run-wait.ts,extensions/codex/src/app-server/attempt-turn-watches.ts)extensions/codex/src/app-server/attempt-turn-watches.ts)extensions/codex/src/app-server/attempt-turn-watches.ts,src/agents/embedded-agent-runner/run/codex-app-server-recovery.ts)src/logging/diagnostic-stuck-session-recovery.runtime.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.carter-smalls commentedon Jun 5, 2026
This looks like an OpenAI timeout situation.
npx ai-doctormight catch missing timeout guards and unprotected requests.100yenadmin commentedon Jun 18, 2026
Fresh related local reproduction from OpenClaw
2026.6.8 (844f405)on macOS launchd, with active@martian-engineering/lossless-claw@0.13.1.Observed from a Telegram-bound
agent:main:mainsession after sending/lossless doctorshortly after a gateway/service repair:Immediately after that, the restored transcript received the system recovery prompt:
Follow-up state:
This looks like the same failure family as this issue:
sessions_sendcan leave the native Codex transcript in a non-pairable tool-call state during timeout/restart recovery. The user-visible symptom was a dropped/interrupted turn rather than a clean command result.openclaw-barnacle commentedon Jul 6, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
openclaw-barnacle commentedon Jul 14, 2026
Closing due to inactivity.
If this is still an issue, please retry on the latest OpenClaw release and share updated details.
If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.