openclaw - 💡(How to fix) Fix Session file lock timeout when multiple subagent completion events arrive concurrently

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…

Error Message

Observed Error

[warn] Subagent announce give up (retry-limit) run=96add4e4 child=agent:stuart-coder:subagent:dac1add9 requester=agent:stuart-trader:discord:channel:1505029661288042538 retries=3 endedAgo=124s deliveryError="completion agent handoff is still pending; direct-primary: completion agent handoff is still pending"

Code Example

[warn] Subagent announce give up (retry-limit) run=96add4e4 child=agent:stuart-coder:subagent:dac1add9 requester=agent:stuart-trader:discord:channel:1505029661288042538 retries=3 endedAgo=124s deliveryError="completion agent handoff is still pending; direct-primary: completion agent handoff is still pending"

[agents/agent-command] Turn transcript persistence failed for agent:stuart-trader:discord:channel:1505029661288042538: session file locked (timeout 60000ms): pid=6079 ...sessions/e6ab114a.jsonl.lock

⚠️ ✉️ Message failed
RAW_BUFFERClick to expand / collapse

Problem

When multiple subagents complete near-simultaneously, their completion announce events compete for the parent session's file lock, causing timeout and delivery failure.

Reproduction

  1. Spawn 3 subagents in parallel from the same parent session (e.g. stuart-trader spawns 3 stuart-coder instances)
  2. All 3 complete within seconds of each other
  3. Gateway attempts to deliver completion events to the parent session concurrently

Observed Error

[warn] Subagent announce give up (retry-limit) run=96add4e4 child=agent:stuart-coder:subagent:dac1add9 requester=agent:stuart-trader:discord:channel:1505029661288042538 retries=3 endedAgo=124s deliveryError="completion agent handoff is still pending; direct-primary: completion agent handoff is still pending"

[agents/agent-command] Turn transcript persistence failed for agent:stuart-trader:discord:channel:1505029661288042538: session file locked (timeout 60000ms): pid=6079 ...sessions/e6ab114a.jsonl.lock

⚠️ ✉️ Message failed

Impact

  • Completion events silently dropped after 3 retries
  • Parent agent never receives some subagent results
  • Downstream Discord message delivery also fails

Environment

  • OpenClaw v2026.5.27
  • 3 parallel subagents (openai-codex/gpt-5.5) spawned from one parent (github-copilot/claude-opus-4.6)
  • Host: Ubuntu 26.04, Node v24.15.0

Suggestion

Consider a per-session write queue (FIFO) or serialized lock acquisition with backoff for completion event delivery, so concurrent completions don't starve each other on the session file lock.

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 Session file lock timeout when multiple subagent completion events arrive concurrently