-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: EmbeddedAttemptSessionTakeoverError causes silent message loss when session lock is released during API retries #87180
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When a model API (e.g., DeepSeek) experiences consecutive ECONNRESET errors,
the gateway retries the request. During retries, the embedded prompt lock
on the session file is released. If another message queues up and modifies
the session file during this window, the original attempt detects a
fingerprint mismatch and throws
EmbeddedAttemptSessionTakeoverError:Steps to reproduce
session file → original attempt resumes and detects fingerprint mismatch
EmbeddedAttemptSessionTakeoverErroris thrown, reply is never deliveredExpected behavior
The session lock should either:
Actual behavior
OpenClaw version
2026.5.22
Operating system
macOS 14.6.1
Install method
No response
Model
deepseek-v4-pro
Provider / routing chain
openclaw-deepseek
Additional provider/model setup details
The
noopLockfallback in the current implementation (return noopLock)effectively discards the lock acquisition — there's no retry logic or
graceful degradation. A simple retry loop (e.g., 3 attempts with
exponential backoff) would significantly reduce message loss.
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response