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
Owner question: may the cleaner delete idle agent session scratch (about 24 GB)? #466
May the cleaner delete old agent session scratch folders? This frees about 24 GB on the shared machine now. The space comes back every few days.
What would be deleted: the per-session scratch folder Claude Code makes under /tmp. Only sessions whose transcript has not changed for 3 days, and only when no process is working in the folder or holding a file in it open.
What is never deleted:
the transcripts themselves
Codex sessions and T3 databases
any git folder in a scratch folder that has unpushed commits or uncommitted changes (these are kept and listed instead)
Why it needs your yes: the current cleaner skips these folders on purpose. Claude Code's own contract says the scratch folder may be cleared, but your earlier rule kept them.
State question:
Run again: nothing is left to do.
Stopped half-way: a partly deleted scratch folder, which the next run finishes.
In use: skipped.
Reply yes or no. The study is in the orchestrator's research notes (storage, 2026-11-18). The rule ships with the general cleaner (#470).
Owner decision (in chat, 2026-11-18): yes, with one condition from the owner: before raw data is deleted, check whether anything in it is worth keeping for analysis. If so, analyse it and save the analysed output first; only then delete the raw data. Do not analyse what is not worth keeping.
Done: the agent-scratch rule in fork-kit/cleaner copies the files worth keeping out first (keepFirst.patterns), reads the copy back, and only then deletes (README section on keep-first, rules.py KeepFirstError).
Activity
scuttletoby commentedon Nov 18, 2026
Owner decision (in chat, 2026-11-18): yes, with one condition from the owner: before raw data is deleted, check whether anything in it is worth keeping for analysis. If so, analyse it and save the analysed output first; only then delete the raw data. Do not analyse what is not worth keeping.
🤖 Generated with Claude Code
scuttletoby commentedon Nov 21, 2026
Done: the
agent-scratchrule in fork-kit/cleaner copies the files worth keeping out first (keepFirst.patterns), reads the copy back, and only then deletes (README section on keep-first, rules.py KeepFirstError).🤖 Generated with Claude Code