📁 File Management Reddit

Cowork Local Sessions Ballooning? He Turned Anthropic Support's Reply Into a Cross-Platform Cleanup Skill

The author noticed his local Cowork sandbox kept growing and that Archive doesn't actually delete files. His first attempt — letting Claude clean up the 23GB sandbox directly — broke Cowork, and he had to restore it with Codex and Claude CLI. After that he emailed Anthropic support and got the real session-folder path (~/Library/Application Support/Claude/local-agent-mode-sessions/<account>/<org>/ on Mac). Since he runs Windows, he had Claude CLI find the equivalent path, then list every session numbered by title so he could delete selectively. He packaged the whole flow as a /delete-old-cowork skill: cross-platform discovery, metadata-only reads (never transcripts), user-confirmed batch deletion, explicit refusal to touch agent/ or cowork-gb-cache.json — a safe scalpel for anyone hitting the same problem

★★☆ Intermediate 5-15 min per cleanup session 20. April 2026
G
GoodArchitect_ @u/GoodArchitect_

Built a portable skill for listing and selectively deleting old Claude Cowork session files

Source
📋

Scenario

Cowork's local conversation files accumulate over time, and Archive only hides sessions from the UI — the on-disk sandbox keeps growing. The author's first instinct was to let Claude clean up the 23GB sandbox; that broke Cowork. After contacting Anthropic support he understood the right target: the local_<uuid>.json sidecars + matching folders that live in a dedicated sessions directory (not the sandbox). But that directory sits in a different path per OS (macOS, Windows, Linux) and is nested under account_id/org_id UUIDs — hard for a non-developer to find manually.

💬

Prompt

Help me list and selectively delete my Claude desktop Cowork (local agent-mode) session records. Each record is a local_<uuid>.json sidecar plus a matching local_<uuid>/ folder. Guardrails you must follow: (1) discover the sessions folder at runtime for my OS — do not hard-code the path; (2) read only safe metadata fields from the sidecar (title, created-at, size) — never open or print transcript content; (3) show a numbered dry-run list grouped by rule ("archived", "older than 30d", etc.) and wait for my explicit confirmation before deleting; (4) never touch anything outside the sessions folder, especially agent/ and cowork-gb-cache.json; (5) stay fully local — no network calls.

Expected Result

The author distilled the hard lesson into a /delete-old-cowork skill: - **Cross-platform path discovery** — detects the local-agent-mode-sessions directory at runtime on macOS, Windows, and Linux; never hard-codes a path - **Metadata-only reads** — pulls title / created-at / size from each sidecar JSON, never opens or prints `initialMessage` or other transcript fields - **Numbered dry run** — groups sessions by rule ("archived", "older than N days", "title matches X") and waits for explicit user picks before deleting - **Batch delete by explicit rule** — deletions are always rule-driven, not vague - **Infrastructure allowlist** — refuses to touch `agent/`, `cowork-gb-cache.json`, or any non-`local_*` file; those are runtime state, not conversations - **Scheduled tasks untouched** — tasks live elsewhere (`~/OneDrive/Documents/Claude/Scheduled/` or the app's schedule config) and the skill tells users that up-front - **Fully local** — no network access, nothing uploaded **Honest scope note:** the skill doesn't shrink the 23GB sandbox itself — that's a different problem he's still escalating with Anthropic. So this skill is positioned not as a magic disk-cleaner but as a safe scalpel for session-record cleanup, so others don't repeat his Cowork-breaking mistake.

📝

Original Post

· 2026-04-20

If you are like me then cowork is taking up a lot of room on your computer as you use it constantly. Archiving does not delete the file. After using Claude to clean up the Claude Cowork 23GB sandbox — yes, this does break cowork, don't do it! I had to get codex and claude CLI to fix it afterwards. So after that I emailed Anthropic. They said the conversations on cowork live here on a Mac: ~/Library/Application Support/Claude/local-agent-mode-sessions/[account_id]/[org_id]/ I'm not on a Mac, so I asked Claude CLI to find the Windows equivalent. Then got it to pull the conversation titles and number them so I could ask it to delete the ones I wanted to. I then made it a skill (/delete-old-cowork): Discovers the sessions folder at runtime on macOS, Windows, or Linux; reads each local_<uuid>.json sidecar to extract safe metadata only (never transcript content); lists sessions with stable numbers; deletes in explicit user-confirmed batches; refuses to touch anything outside the discovered sessions folder (in particular agent/, cowork-gb-cache.json, or any non-local_* file). Guardrails include: never printing transcript content, never hard-coding account/org UUIDs, always showing a dry-run list before deletion, and never fetching anything over the network.