forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.New issue. Needs quick review to confirm validity and assign labels.bugSomething isn't workingSomething isn't working
Description
Type
Bug
Problem / Value
When files are read during a task, their full contents are saved into the chat history snapshots (ui_messages.json) via clineMessages, even though the app doesn’t use those contents after that turn. This bloats storage and can lead to the UI becoming unusable (gray screen). Fixing this reduces disk usage, lowers privacy exposure, and prevents UI failures.
Context
- The chat history array (“clineMessages”) is persisted to snapshots (ui_messages.json), which currently include full read_file payloads.
- Rehydration loads API conversation history (api_conversation_history.json), not these snapshot copies, so the large stored file texts are unused by runtime but still increase snapshot size and risk.
- Impact is highest when large files or many read_file operations occur within a task.
Constraints/Preferences
- Stop saving full read_file contents to snapshots going forward (store only path and a brief preview/reason if needed).
- On rehydration of existing tasks, purge stored file contents from snapshots to maintain backward compatibility and allow old tasks to load reliably and avoid gray-screen failures.
References: Global names for ui_messages.json and api_conversation_history.json are declared in src/shared/globalFileNames.ts
Metadata
Metadata
Assignees
Labels
Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.New issue. Needs quick review to confirm validity and assign labels.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done