isolatedSession: true does not actually isolate heartbeat sessions
Related: #51542 (locked)
Environment
- OpenClaw 2026.3.28 (f9b1079)
- Linux 6.17.0-1009-aws (x64), Node 24.14.0
Config
{
"heartbeat": {
"every": "30m",
"target": "last",
"directPolicy": "allow",
"isolatedSession": true
}
}
Observed behavior
- A heartbeat session created on 2026-03-27 was reused continuously for 2+ days (543 JSONL entries, same session ID
97ba1b61-*)
HEARTBEAT.md was updated on 2026-03-29 05:07 UTC (changed "B站UP主" → "微博博主"), but the heartbeat kept outputting the old text from the cached system prompt
- The session contained 111 references to the old text and 0 references to the updated text
- Gateway restart (new PID) did not create a fresh session — the old one was loaded from persistent storage
Expected behavior
Per docs: isolatedSession: true should provide "fresh session each run (no conversation history)". Each heartbeat tick should:
- Create a new session
- Re-read HEARTBEAT.md into the system prompt
- Not carry over context from previous heartbeat runs
Workaround
Manually delete the session file + remove heartbeat keys from sessions.json:
rm ~/.openclaw/agents/<agent>/sessions/<session-id>.jsonl
# + remove heartbeat session entries from sessions.json
Root cause hypothesis
isolatedSession: true is either:
- Not being checked when deciding whether to reuse an existing heartbeat session, or
- The isolation logic creates a "new" session but restores from persistent storage using the same session key, negating isolation
isolatedSession: truedoes not actually isolate heartbeat sessionsRelated: #51542 (locked)
Environment
Config
{ "heartbeat": { "every": "30m", "target": "last", "directPolicy": "allow", "isolatedSession": true } }Observed behavior
97ba1b61-*)HEARTBEAT.mdwas updated on 2026-03-29 05:07 UTC (changed "B站UP主" → "微博博主"), but the heartbeat kept outputting the old text from the cached system promptExpected behavior
Per docs:
isolatedSession: trueshould provide "fresh session each run (no conversation history)". Each heartbeat tick should:Workaround
Manually delete the session file + remove heartbeat keys from
sessions.json:Root cause hypothesis
isolatedSession: trueis either: