-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: isolated cron can still self-conflict on a dedicated cron agent with EmbeddedAttemptSessionTakeoverError #88369
Copy link
Copy link
Open
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 workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper 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 marked this issue as needing maintainer review before automation.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.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: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
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 workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper 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 marked this issue as needing maintainer review before automation.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.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: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
On 2026.5.28-beta.3, cron runs can still fail with EmbeddedAttemptSessionTakeoverError on files inside /agents/cron/sessions even after cron was moved to a dedicated cron agent with isolated sessionTarget.
Steps to reproduce
Expected behavior
After cron is moved to a dedicated agent and uses isolated sessionTarget, cron runs should not fail because their own session file changed during execution.
Actual behavior
Observed failing runs end with EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released. The latest examples are cron-owned session files such as /home/node/.openclaw/agents/cron/sessions/f1f8713e-b766-4b01-a6c2-489104a28854.jsonl, /home/node/.openclaw/agents/cron/sessions/e4b8e1ce-0100-4d64-9bb0-5376655ac06c.jsonl, and /home/node/.openclaw/agents/cron/sessions/3b0fac23-a272-46c5-9679-2068a7df6055.jsonl.
OpenClaw version
2026.5.28-beta.3
Operating system
Linux 5.19.17-z4pro-generic (x64)
Install method
Self-hosted gateway on Linux; exact packaging NOT_ENOUGH_INFO
Model
Multiple models were involved during fallback/retry in observed failing runs; see additional provider/model setup details.
Provider / routing chain
OpenClaw gateway -> configured fallback chain across multiple providers in observed failing runs (including Bailian, SiliconFlow, and Xiaomi Coding).
Additional provider/model setup details
Observed setup before the latest repro: single gateway, main chat + dashboard + cron originally; later cron moved to a dedicated cron agent with its own agentDir. Heartbeat was disabled. Cron jobs used sessionTarget: "isolated" and payload.kind: "agentTurn". Provider retries/noise were also present in logs, but the key evidence in this report is takeover on cron-owned session files under /agents/cron/sessions.
Logs, screenshots, and evidence
Observed error: EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released. Latest failing examples: - /home/node/.openclaw/agents/cron/sessions/f1f8713e-b766-4b01-a6c2-489104a28854.jsonl - /home/node/.openclaw/agents/cron/sessions/e4b8e1ce-0100-4d64-9bb0-5376655ac06c.jsonl - /home/node/.openclaw/agents/cron/sessions/3b0fac23-a272-46c5-9679-2068a7df6055.jsonl Node.js: v24.14.0Impact and severity
Affected: cron-driven scheduled jobs in this deployment, including Feishu-facing cron workflows.
Severity: High for affected scheduled workflows because runs fail before completion.
Frequency: Intermittent but repeatedly observed across multiple cron runs.
Consequence: scheduled tasks do not complete reliably, and retries/mixed failures make diagnosis harder.
Additional information
This appears related to earlier EmbeddedAttemptSessionTakeoverError reports, but the key distinction here is that the newer repro occurs on cron-owned session files after cron was moved off main into a dedicated cron agent. A separate workspace/path issue also exists in this deployment, but that is not the root cause of this specific report.