openclaw - 💡(How to fix) Fix [Bug]: isolated cron can still self-conflict on a dedicated cron agent with EmbeddedAttemptSessionTakeoverError

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…

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.

Error Message

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.0

Root Cause

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.

Code Example

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.0
RAW_BUFFERClick to expand / collapse

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

  1. Start OpenClaw 2026.5.28-beta.3 on Linux with main chat, dashboard, and cron enabled.
  2. Configure cron jobs with sessionTarget: "isolated" and payload.kind: "agentTurn".
  3. Move cron to a dedicated cron agent with its own agentDir and session directory.
  4. Disable heartbeat and trigger cron runs repeatedly.
  5. Observe some runs failing with EmbeddedAttemptSessionTakeoverError on files under /home/node/.openclaw/agents/cron/sessions/.

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.0

Impact 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.

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

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.

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 [Bug]: isolated cron can still self-conflict on a dedicated cron agent with EmbeddedAttemptSessionTakeoverError