You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
userData image stores (tool-images/, attachments/) are never pruned; reads are sync base64 on the main thread #145
electron/tool-images.js:8-9 and electron/attachments.js:91-92 both admit in comments that nothing is ever pruned. Reads are synchronous whole-file base64 conversions on the main thread: tool-images.js:91-92, attachments.js:133-136 (up to MAX_IMAGE_BYTES = 20MB, about 27MB of base64 per IPC reply).
Impact
Disk usage grows monotonically with every screenshot and paste, and opening a thread with several large images blocks the main process on multi-MB readFileSync + base64 per image per render. The sync reads feed into the main-thread stall cluster of #124.
Fix direction
Prune images for archived/deleted threads (and a global size cap).
Serve images over a file:// or custom protocol handler instead of base64 over IPC, or at least read them async.
Folding in #625, which was filed for this same defect from a live disk inventory (closed as duplicate).
Measured on the daily driver 2026-08-20:
worktrees 27.6 GB owned by GC (#316/#559) ok
coder-store.json.bak 177 MB no owner
coder-store.json 163 MB per-thread caps (#89), aggregate unbounded (#225)
memory.db 44 MB memory-server janitor
tool-images 28 MB no owner
attachments 5 MB no owner
tool-images grew 19 MB / 114 files -> 28 MB / 159 files in one day, roughly +9 MB/day under normal use.
The shortcut comment at electron/tool-images.js:8-9 gates the decision on two premises and both have expired:
// ponytail: files are never pruned - a screenshot is ~200KB and nothing else// in userData is pruned either. Add an age sweep on boot if it ever grows.
"nothing else in userData is pruned either" was true when written (2026-08-15) and false since #559 shipped worktree retention. "if it ever grows" - it grew. electron/attachments.js:92 carries the same note without even the trigger condition.
33 MB next to 27.6 GB of worktrees is a rounding error in absolute terms; the point is that it is unbounded and has no owner. This issue keeps its second, separate half (sync readFileSync + base64 on the main thread) as well.
Activity
currentbits commentedon Aug 20, 2026
Folding in #625, which was filed for this same defect from a live disk inventory (closed as duplicate).
Measured on the daily driver 2026-08-20:
tool-imagesgrew 19 MB / 114 files -> 28 MB / 159 files in one day, roughly +9 MB/day under normal use.The shortcut comment at
electron/tool-images.js:8-9gates the decision on two premises and both have expired:"nothing else in userData is pruned either" was true when written (2026-08-15) and false since #559 shipped worktree retention. "if it ever grows" - it grew.
electron/attachments.js:92carries the same note without even the trigger condition.33 MB next to 27.6 GB of worktrees is a rounding error in absolute terms; the point is that it is unbounded and has no owner. This issue keeps its second, separate half (sync
readFileSync+ base64 on the main thread) as well.currentbits commentedon Aug 22, 2026
Implementing on this issue (plan:doing).
Prune (no archived-transcript hydrate):
tool-images/<threadId>/(legacy flat files still read).tool-images/<tid>/andattachments/<tid>/when the thread is archived or gone.Reads (stop sync base64 on the main thread):
solenta-media://protocol,net.fetchof the file, CSPimg-srcupdated. IPC returns the URL after a cheapaccess(), no base64.serveDataUrlsso the handlerreadFiles async and still replies with a data URL.Unarchive does not restore deleted bytes.
currentbits commentedon Aug 22, 2026
Landed in this worktree.
tool-images/andattachments/, plus unreferenced legacy flat files (live transcripts only), plus a 512MB oldest-first cap. Runs on boot (15s sweep), archive, delete, remove-project, automation prune.solenta-media://protocol (net.fetchof the file). IPC returns the URL afteraccess(), no base64.serveDataUrlsso theyreadFileasync and still reply with a data URL.New tool images are stored as
tool-images/<threadId>/<uuid>.png. Unarchive does not restore deleted bytes.currentbits commentedon Aug 22, 2026
Landed from Solenta thread "Fork: userData image stores (tool-images/, attachments/) are". Closed on merge.