openclaw - 💡(How to fix) Fix [Bug]: Session write-lock timeouts block subagent delivery lanes [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…

Session JSONL write-lock timeouts block main, cron-nested, and subagent lanes, then surface as delivery/lifecycle failures without enough owner diagnostics.

Error Message

Window analyzed: 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z Counts:

  • 161 lines contained: SessionWriteLockTimeoutError
  • 41 lines contained: lane task rejected after timeout
  • 158 lines contained: lane task error

Redacted excerpts: lane task rejected after timeout: lane=subagent timeoutMs=31000 error="SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]" lane task error: lane=cron-nested durationMs=380507 error="SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]" [warn] Subagent completion direct announce failed for run [redacted run id]: SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]: code=OPENCLAW_SESSION_WRITE_LOCK_TIMEOUT

Root Cause

Impact and severity

Affected: main session, cron-nested, and subagent delivery lanes. Severity: High, because completion output can fail after child work is otherwise done. Frequency: 161 timeout lines were observed in the analyzed two-day log window. Consequence: lifecycle delivery and direct announce can fail behind a session write lock.

Fix Action

Fixed

Code Example

Window analyzed: 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z
Counts:
- 161 lines contained: SessionWriteLockTimeoutError
- 41 lines contained: lane task rejected after timeout
- 158 lines contained: lane task error

Redacted excerpts:
lane task rejected after timeout: lane=subagent timeoutMs=31000 error="SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]"
lane task error: lane=cron-nested durationMs=380507 error="SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]"
[warn] Subagent completion direct announce failed for run [redacted run id]: SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]: code=OPENCLAW_SESSION_WRITE_LOCK_TIMEOUT
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Session JSONL write-lock timeouts block main, cron-nested, and subagent lanes, then surface as delivery/lifecycle failures without enough owner diagnostics.

Steps to reproduce

  1. Run OpenClaw with main-session and subagent delivery lanes writing to session JSONL files.
  2. Contend a session write lock long enough for lane tasks and final delivery to hit the write-lock timeout.
  3. Observe lane errors and direct announce failure logs.

Expected behavior

Write-lock timeouts should preserve enough owner liveness/starttime/staleness evidence for recovery triage, and subagent final output should remain durable even when direct announce cannot acquire the lock.

Actual behavior

Gateway logs showed 161 SessionWriteLockTimeoutError lines, 41 subagent lane rejections, and repeated main-session lane errors in the 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z window.

OpenClaw version

2026.5.25 dev checkout

Operating system

Linux WSL2

Install method

pnpm dev

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Window analyzed: 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z
Counts:
- 161 lines contained: SessionWriteLockTimeoutError
- 41 lines contained: lane task rejected after timeout
- 158 lines contained: lane task error

Redacted excerpts:
lane task rejected after timeout: lane=subagent timeoutMs=31000 error="SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]"
lane task error: lane=cron-nested durationMs=380507 error="SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]"
[warn] Subagent completion direct announce failed for run [redacted run id]: SessionWriteLockTimeoutError: session file locked (timeout 60000ms): pid=[redacted pid] [redacted session lock path]: code=OPENCLAW_SESSION_WRITE_LOCK_TIMEOUT

Impact and severity

Affected: main session, cron-nested, and subagent delivery lanes. Severity: High, because completion output can fail after child work is otherwise done. Frequency: 161 timeout lines were observed in the analyzed two-day log window. Consequence: lifecycle delivery and direct announce can fail behind a session write lock.

Additional information

The implicated code paths were src/agents/session-write-lock.ts timeout reporting and subagent final-delivery persistence.

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

Write-lock timeouts should preserve enough owner liveness/starttime/staleness evidence for recovery triage, and subagent final output should remain durable even when direct announce cannot acquire the lock.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING