SweepLoom

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.

How to read a sweeploom sessions row
ColumnMeaning
[ ] / [x]Whether the session is in a dry-run plan (--quiet, --free-ram, --reduce-cpu)
Cursor / Codex / Claude CodeThe whole tree, not 43 Task Manager lines
proc=Members of that tree
rss=Sum of resident memory. Not uniquely reclaimable
rec=KeepDo not terminate: the chat context lives here
last columnAttributed project path, or - when unknown
dry-run plans
$ 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.
Why SweepLoom will never kill your idle agent

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.

look, then --apply
$ 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
projects: heat, Git, offers
$ 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.

Cleanup sections, sources and actions
SectionSources and granularityAction
Project outputGenerated builds, dependencies and temp files across every discovered project, with rebuild cost and blockers such as uncommitted Git changesPlan, revalidate, execute, receipt; or move selected paths to Trash
DockerIndividual images, stopped containers, unused volumes and old build cacheNative Docker operations; in-use objects are protected
iOS & XcodeSimulator 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 stateNative simctl delete or erase with running-device checks; unavailable devices by exact UDID only; root-owned caches read-only
Build & packagesDerivedData 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 cachesConfirmed generated cleanup, or move selected paths to Trash
App & browser cachesUser application caches and exact cache subdirectories in browser, IDE and Electron profilesGenerated cleanup for recognised cache paths; Trash for other application caches
AI modelsOllama by model, Hugging Face by repository or dataset, LM Studio, PyTorch, Whisper and Core ML downloadsOllama's local API, or Trash for individual downloaded model files
Archives & large dataXcode release archives, device backups, large downloads and installers, logs, Maven artifacts, Rust toolchains and Node versionsTrash 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

  • OverviewMemory, per-core CPU and disk pressure; every tile opens the screen that explains it
  • SessionsSession trees, member processes, observed CPU, dry-run plans
  • HistoryObserved process activity, plus saved disk scansProcess activity · Disk scans

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

  • BrowserBrowser trees, companion tabs, the Later shelfProcess trees · Tabs · Later
  • AIAI stores, classes and always-on token tax

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.

Tour the desktop app

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.

AI store classes
LeafClassClean?Always-on tokens
AGENTS.md, *.mdc, rulesContextnomin(bytes/4, 8000); skills, plugins, rules dirs capped at 4096
history.jsonl, projects, sessionsHistoryno0
cache, tmp, CachedDataCacheyes0
.credentials.json, token.txtSecretno0
*.sqlite, *.vscdbSQLiteno0
*.log, .last-cleanupLogyes0
mcp.json, settings.jsonSettingsno0
password-reset.md, cachet.jsonOtherno0
fixed gold store, not your disk
$ 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, *.mdc and rules, even when idle.
  • park? for skills or plugins idle 30 days or more. Advice only: SweepLoom never flips alwaysApply.
  • Secrets and SQLite are never opened and never cleanable. Only cache and log rows are cleanable, and sweeploom ai itself 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.

without the companion
$ 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.

install the native host
$ 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.

How each surface gates apply
SurfaceLookConsentReceipt
CLIsweeploom clean . (dry run)--apply is consent; only pre-selected SAFE rowsreceipt=1 deleted=2 skipped_changed=0 failed=0
MCPcleanup_candidates, explain_candidateapply_cleanup with confirm: true and the agreed ids{ ok, deleted, skipped_changed, failed, receipt }
Desktop appCleanup tabs, from Project output to iOS & XcodeA confirmation that lists exactly the eligible selected rowsResult 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.

MCP tools and arguments
ToolArgumentsWritesWhat it returns
list_sessionsnonenoLive session trees with Keep / Optional recommendations
disk_inventoryroot? stringnoWhat is on disk under a root, with categories (metadata only)
list_projectsroot? stringnoProject kinds, source and artifact heat, Git state
list_ai_storesnonenoAI tool stores, classes and always-on token estimates; never opens secrets or SQLite
advise_contextrelative stringnoAdvice for one leaf name: keep for Context such as AGENTS.md, empty for History; never writes
cleanup_candidatesroot? stringnoReviewable cleanup rows (dry run); SAFE generated rows pre-selected
explain_candidateid u64, root? stringnoOne row in detail before anyone agrees to it
list_browsernonenoBrowser pressure; tabs null when unknown
apply_cleanupconfirm bool, root?, ids? u64[]yes, if confirmRevalidate and delete the agreed ids; returns a receipt
an agent that tries to skip review
tools/call  apply_cleanup  { "confirm": false, "root": "C:/work/app" } refused: MCP apply needs confirm=true after cleanup_candidates; CLI uses --apply

There 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.

Set up MCP in Claude Code, Cursor, Claude Desktop or Codex

Platforms

Where it runs.

Platform support
ComponentWindowsmacOSLinuxNotes
CLI, MCP server, Rust library yes yes yesCI matrix: Ubuntu, Windows, macOS
Desktop app (egui) yes yes yesFollows light/dark and interface scale
Tray icon yes yes—noHide to tray; scans keep running
Xcode & iOS Simulator cleanup—no yes—noDevice records from disk, then xcrun simctl
Per-core CPU with P/E split—no yes—noApple Silicon; other machines show every core in OS order
Browser companion yes yes yesChromium and Firefox extensions, native messaging