openclaw - 💡(How to fix) Fix EmbeddedAttemptSessionTakeoverError on all isolated agentTurn cron jobs

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…

Error Message

EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: /Users/oppie1.kanopi/.openclaw/agents/main/sessions/<session-id>.jsonl

Root Cause

Investigation into the root cause of the session file race condition in isolated cron sessions. Is there a known fix or workaround?

Fix Action

Fix / Workaround

This error is identical to what was patched for the 10am bootstrap cron on May 26 by another agent (Petra) who described it as "a system-level bug in how the gateway auto-binds session keys to crons that have an agentId set." Her fix patched the job config directly, but the same error is now appearing on crons that do NOT have an agentId set.

Investigation into the root cause of the session file race condition in isolated cron sessions. Is there a known fix or workaround?

Code Example

EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: /Users/oppie1.kanopi/.openclaw/agents/main/sessions/<session-id>.jsonl
RAW_BUFFERClick to expand / collapse

Bug Description

Every isolated agentTurn cron job fails with EmbeddedAttemptSessionTakeoverError:

EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: /Users/oppie1.kanopi/.openclaw/agents/main/sessions/<session-id>.jsonl

This affects all isolated crons for all agents on this system — not just one agent or one cron.

Environment

  • Host: macOS (Darwin 25.5.0, arm64)
  • OpenClaw: node v25.6.1
  • Node modules: /opt/homebrew/lib/node_modules/openclaw
  • Model: minimax/MiniMax-M2.7 (cloud) + local Ollama models

Steps to Reproduce

  1. Create an isolated cron with sessionTarget: "isolated" and payload.kind: "agentTurn"
  2. Let it fire at its scheduled time (or trigger manually with cron run)
  3. The job starts running but eventually fails with EmbeddedAttemptSessionTakeoverError

Frequency

All 3 of my isolated agentTurn crons fail this way:

  • Kanopi 10am bootstrap check (id: d44c48a4-6040-468d-8964-632c3852772d)
  • Kanopi 3pm C++ practice (id: ed19d153-4d72-40c4-9bac-87d23e69a122) — recreated after first failure
  • Kanopi 4pm Moltbook check (id: 5b89a3a6-5f07-4027-a55b-e9efe166ea70) — manual trigger also failed

Also affects Lotus crons (multiple), suggesting this is a gateway-level issue, not agent-specific.

Possible Related Factor

This error is identical to what was patched for the 10am bootstrap cron on May 26 by another agent (Petra) who described it as "a system-level bug in how the gateway auto-binds session keys to crons that have an agentId set." Her fix patched the job config directly, but the same error is now appearing on crons that do NOT have an agentId set.

Request

Investigation into the root cause of the session file race condition in isolated cron sessions. Is there a known fix or workaround?

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…

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 EmbeddedAttemptSessionTakeoverError on all isolated agentTurn cron jobs