Features
One engine. A CLI for hands, MCP for agents, an app for review.
SweepLoom answers three questions locally and without an LLM: what is sitting on disk, in RAM and in the agent host; whether it is still earning its keep; and how to reclaim it without losing the workspace.
Live sessions
Sessions, not processes. Agents stay Keep.
Processes are grouped into the trees you actually run: an agent with its MCP servers, terminals, dev servers and build children. Idle Claude Code, Codex, Cursor, OpenCode, Gemini and Grok are Keep; an MCP server with no live agent parent can be Optional.
| Column | Meaning |
|---|---|
[ ] / [x] | Whether the session is in a dry-run plan (--quiet, --free-ram, --reduce-cpu) |
Cursor / Codex / Claude Code | The whole tree, not 43 Task Manager lines |
proc= | Members of that tree |
rss= | Sum of resident memory. Not uniquely reclaimable |
rec=Keep | Do not terminate: the chat context lives here |
last column | Attributed project path, or - when unknown |
$ sweeploom sessions --quiet$ sweeploom sessions --free-ram 4$ sweeploom sessions --reduce-cpu 20plan=N session(s); dry-run only — terminate is not offered on the CLI- Process identity is PID plus start time, so a recycled PID is never confused with the process you meant.
- Command lines are redacted before they reach the UI, logs or receipts.
- Observed, not guessed: CPU averages appear only after SweepLoom has watched a session; TCP bytes appear only where the OS exposes them.
- The desktop app can stop a session when a person explicitly confirms it: membership is frozen first, the confirmation is cancelled if it changes, and graceful stop comes before force.
Disk & projects
Generated output is SAFE. Your source is not a candidate.
scan maps a tree, projects scores source and artifact heat with Git state, and clean lists only rebuildable artifacts. .git is listed but never a clean candidate; git=dirty tells you source is live, it never authorizes deleting it.
$ sweeploom clean .[x] 1.2 GB cargo target[x] 812.0 MB node_modules[ ] 12.0 KB something inspect-only BLOCKEDdry-run; pass --apply to delete pre-selected SAFE rows after revalidation $ sweeploom clean . --applyreceipt=1 deleted=2 skipped_changed=0 failed=0$ sweeploom projects C:\work\appC:\work\app kind=[Cargo] source=Warm artifact=Hot git=Clean cargo Target 1.2 GB rebuild=Cheap[x] means pre-selected SAFE generated. [ ] with BLOCKED will not go out with --apply, even if you pass it without looking. Cargo target size is attributed to the workspace root; Python generated output is offered too.
Desktop Cleanup
Docker, iOS Simulator, caches and models, itemised.
The desktop app's Cleanup tab has seven sources. It discovers known locations and streams full measurements in the background, and each source keeps its rows, selection and scroll position while you work elsewhere. Every row shows its origin path or native object ID, size, file count when known, change since the last scan, and the consequence of removing it.
| Section | Sources and granularity | Action |
|---|---|---|
| Project output | Generated builds, dependencies and temp files across every discovered project, with rebuild cost and blockers such as uncommitted Git changes | Plan, revalidate, execute, receipt; or move selected paths to Trash |
| Docker | Individual images, stopped containers, unused volumes and old build cache | Native Docker operations; in-use objects are protected |
| iOS & Xcode | Simulator devices read from disk (including XCTest, SwiftUI preview and Playground device sets), runtimes with the devices that use them, leftover device folders, CoreSimulator and dyld caches; Keep / Review / Suggested from last boot, installed apps and their projects' Git state | Native simctl delete or erase with running-device checks; unavailable devices by exact UDID only; root-owned caches read-only |
| Build & packages | DerivedData by project with a Git-aware verdict; iOS, watchOS, tvOS, visionOS and macOS device support by version; npm/npx, pnpm, Yarn, Bun, Python, Cargo, Gradle, NuGet, Go, Homebrew, Playwright/Puppeteer, SwiftPM and other download caches | Confirmed generated cleanup, or move selected paths to Trash |
| App & browser caches | User application caches and exact cache subdirectories in browser, IDE and Electron profiles | Generated cleanup for recognised cache paths; Trash for other application caches |
| AI models | Ollama by model, Hugging Face by repository or dataset, LM Studio, PyTorch, Whisper and Core ML downloads | Ollama's local API, or Trash for individual downloaded model files |
| Archives & large data | Xcode release archives, device backups, large downloads and installers, logs, Maven artifacts, Rust toolchains and Node versions | Trash for user data; rustup uninstall for inactive, non-default compilers |
Allocated blocks, not sparse capacities
Sizes reflect what is actually occupied. Unreadable measurements stay unknown or partial, never an exact zero.
Partial scans authorize nothing
File cleanup checks live working directories, executables and arguments; generated cleanup also revalidates metadata revisions.
Data is not cache
Archives, backups and downloaded models are never assumed regenerable. Trash is restorable in Finder; its space stays used until you empty it.
Ollama models are removed through Ollama's own API on 127.0.0.1:11434, after re-checking loaded models and the selected digest. Android images and virtual machines are measured and shown for inspection with guidance to their native manager. Source catalog: docs/CLEANUP.md. Reclaiming Xcode and iOS Simulator disk safely.
Desktop app
Nine tabs: live, disk, workspace, app.
The desktop app is the reviewer for everything the CLI and MCP cannot touch: native tool storage, user data and explicit session stops. Scans run on bounded worker pools, stream rows as they finish, and survive tab switches.
Live
Disk
- CleanupEverything reclaimable, by source, with the consequence of removalProject output · Docker · iOS & Xcode · Build & packages · App & browser caches · AI models · Archives & large data
- ProjectsEvery project under your developer folders: size, change, Git, artifacts
- ExplorerFolder inspector, off the UI thread; collapsing never re-walks the disk
Workspace
App
- SettingsTheme, interface size, tray; telemetry stays off
Per-core CPU
Overview and Sessions chart every core; on Apple Silicon, performance and efficiency cores are shown as separate groups.
Every project
Discovery covers all your developer folders with fair per-folder budgets, not just the folder the app was launched from.
Crash log
Release builds unwind and log panics, so a failed background scan no longer takes the window down.
AI context
The always-on prompt tax, counted honestly.
sweeploom ai lists the stores your coding agents keep under your home directory and estimates what is injected every turn. History is archive and counts as zero. Classification uses the leaf name only and never opens the file.
| Leaf | Class | Clean? | Always-on tokens |
|---|---|---|---|
AGENTS.md, *.mdc, rules | Context | no | min(bytes/4, 8000); skills, plugins, rules dirs capped at 4096 |
history.jsonl, projects, sessions | History | no | 0 |
cache, tmp, CachedData | Cache | yes | 0 |
.credentials.json, token.txt | Secret | no | 0 |
*.sqlite, *.vscdb | SQLite | no | 0 |
*.log, .last-cleanup | Log | yes | 0 |
mcp.json, settings.json | Settings | no | 0 |
password-reset.md, cachet.json | Other | no | 0 |
$ sweeploom benchSweepLoom bench — AI WITHOUT vs WITH (fixed gold store, not your disk)WITHOUT dump-store/4 238466250 tokWITHOUT History-as-prompt 965000 tokWITH always-on estimate 16288 tokapply confirm=false refused=true deleted=0idle 2GB agents WITHOUT would-kill=6 WITH Keep=6AGENTS.md keep- keep for
AGENTS.md,*.mdcandrules, even when idle. - park? for
skillsorpluginsidle 30 days or more. Advice only: SweepLoom never flipsalwaysApply. - Secrets and SQLite are never opened and never cleanable. Only cache and log rows are cleanable, and
sweeploom aiitself never deletes. - The fixture is policy, not spend: a live coding-agent run found no coding-task token saving. Read the full write-up.
Browser
Real pressure. Tabs are never guessed.
sweeploom browser reports RSS and CPU per browser tree. Without the companion, tab activity is shown as unknown, because tabs=0 would be a lie.
$ sweeploom browsercompanion=disconnected hosts=1 rss=8.2 GBtab lastAccessed unavailable without the companion; not shown as zeroEdge sessions=1 proc=62 rss=8.2 GB cpu= 13.2%The optional SweepLoom Companion extension for Chromium browsers and Firefox reports each tab's title, URL (with credentials, query string and fragment stripped) and lastAccessed to the local SweepLoom process over native messaging. It never closes tabs by default and makes no network requests. When you choose it in the desktop app, it can discard a tab (unload it from memory, keeping it in the strip), focus a tab, or bookmark and close one, closing only if the bookmark exists and the URL is unchanged. Pinned, audible, incognito and active tabs are never discarded or closed. The Later shelf saves a tab's title and URL locally without closing anything.
$ sweeploom companion-install$ sweeploom companion-install --chromium-id <id from edge://extensions>Safety model
Plan, revalidate, execute, receipt. On every surface.
Safety and recommendation are independent axes, and a recommendation never overrides a blocker. If you rebuilt target/ after the plan, that row is skipped, not forced.
| Surface | Look | Consent | Receipt |
|---|---|---|---|
| CLI | sweeploom clean . (dry run) | --apply is consent; only pre-selected SAFE rows | receipt=1 deleted=2 skipped_changed=0 failed=0 |
| MCP | cleanup_candidates, explain_candidate | apply_cleanup with confirm: true and the agreed ids | { ok, deleted, skipped_changed, failed, receipt } |
| Desktop app | Cleanup tabs, from Project output to iOS & Xcode | A confirmation that lists exactly the eligible selected rows | Result line per action; History → Disk scans updated |
- No terminate tool in the CLI or MCP. Live agents and their attached MCP servers stay Keep.
- Secrets, SQLite databases and History are inspect-only. Secrets are never opened.
- AGENTS.md, *.mdc and rules are inspect-only. park? is advice; alwaysApply is never flipped.
- No LLM on classify or apply. Classification is local and deterministic.
- A recommendation never overrides a safety blocker.
- Processes are keyed by PID plus start time, so a recycled PID is never mistaken for yours.
- Command lines are redacted (--token values, URI credentials) before UI, logs or receipts.
- No tokio, hyper or reqwest on the CLI path; cargo-deny bans them.
For agents
Nine MCP tools. One of them writes, and only with confirm=true.
SweepLoom is an MCP server over stdio (io.github.Weavatrix/sweeploom). The Codex plugin bundles the same server with three skills (review-cleanup, token-tax and live-sessions) that encode review-before-apply.
| Tool | Arguments | Writes | What it returns |
|---|---|---|---|
list_sessions | none | no | Live session trees with Keep / Optional recommendations |
disk_inventory | root? string | no | What is on disk under a root, with categories (metadata only) |
list_projects | root? string | no | Project kinds, source and artifact heat, Git state |
list_ai_stores | none | no | AI tool stores, classes and always-on token estimates; never opens secrets or SQLite |
advise_context | relative string | no | Advice for one leaf name: keep for Context such as AGENTS.md, empty for History; never writes |
cleanup_candidates | root? string | no | Reviewable cleanup rows (dry run); SAFE generated rows pre-selected |
explain_candidate | id u64, root? string | no | One row in detail before anyone agrees to it |
list_browser | none | no | Browser pressure; tabs null when unknown |
apply_cleanup | confirm bool, root?, ids? u64[] | yes, if confirm | Revalidate and delete the agreed ids; returns a receipt |
tools/call apply_cleanup { "confirm": false, "root": "C:/work/app" } refused: MCP apply needs confirm=true after cleanup_candidates; CLI uses --applyThere is no terminate, no park_file and no rewrite_agents. Read-only tools publish readOnlyHint. Empty root means your home directory, so agents should always pass the workspace path.
Platforms
Where it runs.
| Component | Windows | macOS | Linux | Notes |
|---|---|---|---|---|
| CLI, MCP server, Rust library | yes | yes | yes | CI matrix: Ubuntu, Windows, macOS |
| Desktop app (egui) | yes | yes | yes | Follows light/dark and interface scale |
| Tray icon | yes | yes | —no | Hide to tray; scans keep running |
| Xcode & iOS Simulator cleanup | —no | yes | —no | Device records from disk, then xcrun simctl |
| Per-core CPU with P/E split | —no | yes | —no | Apple Silicon; other machines show every core in OS order |
| Browser companion | yes | yes | yes | Chromium and Firefox extensions, native messaging |