-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: openclaw doctor fails on large session store with stale sessions.json.*.tmp accumulation #56827
Copy link
Copy link
Closed
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: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: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:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.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.
Description
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: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: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:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.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.
Type
Fields
Priority
None yet
Bug type
Crash (process/app exits or hangs)
Beta release blocker
No
Summary
openclaw doctorfails on one long-lived installation where~/.openclaw/agents/main/sessionscontains a 154 MBsessions.jsonand 67 stalesessions.json.*.tmpfiles totaling about 787 MB.Steps to reproduce
~/.openclaw/agents/main/sessionshas grown to approximately 1.2 GB total, including a large monolithicsessions.jsonand manysessions.json.*.tmpfiles.openclaw doctor.doctorfails with a V8 deserialization stack trace ending nearValueDeserializer::ReadObjectWrapper()/ValueDeserializer::ReadValue(...).Expected behavior
openclaw doctorshould complete successfully on long-lived installations with large session history and should not be destabilized by stalesessions.json.*.tmpfiles.Actual behavior
openclaw doctorfailed, and the observed stack trace ended near:On the affected installation, the sessions directory measured approximately:
sessions.json: 154,466,795 bytessessions.json.*.tmp: 786,956,288 bytes across 67 files*.jsonl: 200,251,621 bytes across 2154 files*.reset.*: 75,188,435 bytes across 48 filesOpenClaw version
2026.3.28
Operating system
Linux arm64
Install method
npm global
Model
openai-codex/gpt-5.4
Provider / routing chain
openclaw -> openai-codex/gpt-5.4
Additional provider/model setup details
NOT_ENOUGH_INFO
Logs, screenshots, and evidence
Impact and severity
Affected: at least one long-lived high-activity installation with a large session store
Severity: high (diagnostic command failure)
Frequency: observed on the affected installation when running
openclaw doctorConsequence: health/diagnostic workflow fails, and the session store can consume significant extra disk space due to stale temp files
Additional information
This appears to have two grounded aspects:
openclaw doctorfailure on a large session storesessions.json.*.tmpfilesSuggested long-term direction: replace the monolithic
sessions.jsoncatalog with a SQLite-backed session metadata store while keeping per-session transcripts as append-only JSONL files. That would allow indexed/incremental reads, safer updates, and lower memory pressure for doctor/status/session inspection paths.