-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Feature] doctor detects stale session snapshots after runtime-path changes #47534
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.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:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.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:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
openclaw doctorshould detect stale session snapshots / cached metadata that still reference old runtime roots after OpenClaw has been moved, rewired, upgraded, or temporarily run from the wrong path.This bit me through bundled skill paths, but the problem is broader than one skill.
Concrete failure mode
I diagnosed a case where:
~/.openclaw/lib/node_modules/openclawskillsSnapshot.promptstill referenced:/opt/homebrew/lib/node_modules/openclaw/skills/github/SKILL.mdA fresh runtime-built snapshot resolved the correct bundled skill path.
The wrong path was coming from the cached session snapshot, not the live resolver.
Why it happens
OpenClaw stores session-cached prompt metadata such as
skillsSnapshot.When the runtime root changes, those cached absolute paths can become stale.
Current snapshot invalidation appears to depend on watched skill roots like workspace / managed / extraDirs / plugin dirs, but not bundled-skill runtime-root changes.
So users can end up with long-lived sessions that still carry bad absolute paths from:
/tmpor/private/tmpWhy
doctorshould catch itFrom the user's perspective this looks like random path breakage:
This is exactly the sort of environment drift
doctorshould surface.Proposed
doctorchecksAdd a diagnostic that:
/tmpor/private/tmpAcceptance criteria
openclaw doctorwarns when a session snapshot references bundled skills under an inactive runtime rootopenclaw doctorwarns when cached metadata references deleted temp-backed runtime pathsRelated but distinct
This is adjacent to UI/path-resolution issues, but not the same class of bug.
This request is specifically about doctor detecting stale snapshot residue after runtime-path changes.
Environment where observed
2026.3.13~/.openclaw/lib/node_modules/openclaw