Skip to content

Session JSONL lock can remain held after synthetic tool-result flush #88647

Description

@steipete

Summary

Follow-up for the lock-scope field report in #88168 after landing the focused synthetic-placeholder race fix in #88588.

A user reported that the synthetic tool-result flush path can coincide with a per-session .jsonl.lock file staying write-held by the live gateway process. The visible symptom is subsequent turns failing with session file locked (timeout 60000ms) until the lock expires or the gateway is killed.

Source report: #88168 (comment)

Scope

  • Version reported: openclaw 2026.5.27
  • Channel: webchat
  • Model API family: Anthropic Messages-compatible
  • Trigger reported: adjacent long-running exec/process polling turns where synthetic missing-result insertion happened while real tool results were racing
  • Impact: session/channel can remain blocked even after the placeholder race itself is fixed

Desired proof

  • Reproduce or disprove that synthetic tool-result writes can acquire a session JSONL lock without releasing it.
  • Confirm whether fix(agents): avoid synthetic tool results during parallel races (#88168) #88588 eliminates the trigger or only reduces the probability.
  • If the lock leak remains possible, route the synthetic write path through the same acquire/release discipline as normal appends, or remove the stale synthetic write path entirely where no longer needed.

Notes

#88588 fixes the central transcript placeholder race by avoiding synthetic insertion at the new assistant tool-call boundary and letting transcript repair move late real results. This issue tracks the separate lock-lifetime claim so #88168 can close for the placeholder behavior without losing the lock report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.agentsAgent runtime and toolingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.maintainerMaintainer-authored PR

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions