Skip to content
IdeaScout.
← Back to archive

AI-generated file janitor for coding agents

AI-discovered

Problem

After months of CLI coding-agent sessions, developers accumulate terabytes of AI-generated markdown files, images and documents that are 'sorta kinda useful' — but they're afraid to delete them because something might break. Nobody has a safe way to distinguish load-bearing agent artifacts from disposable scratch output.

Opportunity

A tool that scans agent workspaces, classifies generated artifacts (referenced by code vs orphaned scratch), visualizes disk usage by session/agent, and offers safe archival or purge with dependency checks and rollback.

Market analysis

The pain is real and growing (a tracked anthropics/claude-code issue describes ~/.claude growing unbounded until it destroys settings), but single-agent cleaners already exist as free OSS and vendors can ship retention knobs natively.

Market · Heavy CLI coding-agent users (Claude Code, Codex, Cursor) with months of accumulated sessions; active Ask HN and GitHub threads signal a vocal niche.

Pricing · Existing solutions are free (built-in cleanupPeriodDays setting, claude-code-cleaner, agent skills); a cross-agent janitor with visualization and rollback could support a one-time $20-40 or $5/mo dev-utility price.

score 6/10 by glm-5.1

Pros

  • + Validated pain: a claude-code issue documents unbounded growth causing cascade failures, and users report full 1TB drives.
  • + Cross-agent scope (Claude Code, Codex, Cursor, Gemini CLI) is untouched; existing cleaners are single-vendor.
  • + Safety angle (dependency checks, quarantine, rollback) differentiates from naive cleanup scripts.

Cons

  • − Vendors can absorb the feature natively; Claude Code already ships a cleanupPeriodDays retention setting.
  • − Free OSS cleaners such as the claude-code-cleaner TUI already cover the largest single agent.
  • − Classifying load-bearing vs orphaned artifacts reliably is genuinely hard; one wrong purge breaks builds and trust.

Source

Hacker News (Ask HN)

Open original thread ↗

The hard part is not deletion but classification: agent workspaces mix session logs, one-off reports, images and genuinely referenced outputs, and no tool can prove a markdown file is orphaned without tracing every script, prompt and import that might read it. The defensible wedge is the cross-agent view (one janitor for the state directories of Claude Code, Codex, Cursor and Gemini CLI) plus a quarantine-first workflow where nothing is deleted outright, only archived with a manifest for instant restore. Expect vendors to keep improving native retention, so the lasting value is the visualization and audit layer, not the cleanup itself.