Your AI Coding Agents Are Filling Up Your Disk. Here’s How to Clean Up Safely
说明与用途
AI 编码代理生成的文件占用磁盘空间。使用 agent‑janitor CLI,用户可以扫描、分类并安全删除这些文件,先归档再删除,并在需要时恢复。
问题
AI coding agents leave behind session transcripts, debug logs, caches, and old worktrees that accumulate and consume disk space, making it hard to identify what is safe to delete.
结果
Disk space is reclaimed without losing important session data, and users can restore archived items when needed.
工作流
- Run a read‑only scan with
npx agent-janitor scanto list found items, sizes, timestamps, and classifications. - Review the scan output, noting any credential patterns flagged in transcript content.
- Execute cleanup with
npx agent-janitor clean, which archives eligible items and removes them after a 30‑day retention gate. - Restore archived data if needed using
agent-janitor restore --list,agent-janitor restore latest, or by specifying a session ID or project name.
证据
agent-janitor scans agent data across tools, shows what it finds, and archives eligible files before removing them.
By default, it applies a 30‑day retention gate, so recent or active data is skipped.
It can also scan transcript content for known credential patterns. That’s an exposure warning—not automatic secret removal or redaction.
- 记录日期: 2026-10-12T18:41:13.194Z