Repository navigation
Release Notes
The first release with everything below. 0.5.0 was tagged but never
released: its build failed on a retired macOS runner (#81), so there are no
0.5.0 binaries or crates.
Security
- Worktrees with a running coding-agent session are never removed. On
2026-11-29,clean --worktrees --days 3removed two clean, pushed
worktrees whose Claude Code sessions had sat idle for 5 days but were
still running; nothing was lost, but those sessions were left pointing at
a missing folder. lysosome now reads Claude Code's session records
(~/.claude/sessions/*.json, or$CLAUDE_CONFIG_DIR/sessions) and treats
every worktree or project that a live session works in asACTIVE,
whatever its idle time (details.live_session).cleanreads them again
right before each worktree, worktree-artifact or project-artifact item, so
a session started after the scan also keeps its folder.
Added
-
scan --shareprints a short card of totals to post, such as "My coding
agents left 161 git worktrees holding 150 GB on my Mac. 68.1 GB of it can
go without losing any work.", and at a terminal copies it to the clipboard
(pbcopy;wl-copy,xcliporxselon Linux). It never holds a path,
project, branch or model name, and nothing is uploaded. -
clean --strip-artifactsalso takes the git-ignored build output
(node_modules,target,.venv,dist, ...) ofACTIVEworktrees,
the ones used within--days, and keeps the worktree and every other
file in it. Only once a worktree has been left alone a day
(STRIP_ACTIVE_MIN_IDLE_DAYS) and no coding-agent session is running in
it; both are checked again right before each folder goes. Most of the
space agents leave is here: in the dogfood scan, 68 GB of 150 GB was build
output, while only 1.5 GB was in worktrees past the 30-day rule. Plan
items stripped from such a worktree havestatus: "ACTIVE"(an additive
value inclean.schema.json). -
lysosome scanends with what coding agents' worktrees hold and the
clean that takes it back, for exampleYour coding agents left 68.1 GB on this Mac. Reclaim safely: lysosome clean --worktrees(worktrees that are
done) andlysosome clean --strip-artifacts --tier regenerable_expensive
(build output of the worktrees that stay), with the scan's own folders and
options. Human output only;--jsonis unchanged. -
integrations/: copy-paste recipes, each with a two-minute README. A
Claude CodeSessionEndhook removes a session's worktree once its PR is
merged. A launchd agent (macOS) or systemd user timer (Linux) runs the safe
tier hourly and warns when free space is low. MCP configs cover Claude Code,
Claude Desktop, Cursor and Codex. Every recipe goes throughlysosome clean
and its re-checks. -
Merged worktrees are
REMOVABLEat any age: clean, unlocked and merged
into the default branch (or squash-merged pergh), once left alone a
day.--daysnow only protects work that isn't merged. In the dogfood
run that found this, the default 30-day scan called all 494 worktrees
ACTIVEwhile 57 of them (67 GB) were merged and done. -
Pushed worktrees with no open PR are
REMOVABLEbefore--days: clean,
unlocked, idle a day, every commit on a remote-tracking ref, andgh pr list --state open --head <branch>finds no open PR from the repository
("clean, every commit on a remote, no open PR"). An open PR keeps it
ACTIVEand names the PR; withoutghnothing changes.cleanasks
GitHub again right before removing one. This matches the rule agent
fleets already use to garbage-collect their worktrees (never-used
worktrees, closed PRs, merged PRs whose branch moved on to a pushed
commit). -
Multi-repo workspace worktrees (one linked worktree per sub-repo inside a
workspace worktree) areREMOVABLEwhen every nested worktree is
(details.nested_worktrees), andREVIEWnaming the one that isn't.
cleanre-checks each nested worktree, removes it through its own
repository, then removes the outer one. Before, they were skipped with "it
contains a git checkout (cli/.git inside)". -
cleanmeasures what partial cleanups would actually free before it
shows the plan, so "Would reclaim" is close to what a run frees. conda: by
conda's own rule (tarballs, the index cache, and packages none of whose
files is hard-linked into an environment), without running conda, so old
conda versions work too. pnpm: store files no project hard-links to.
Homebrew:brew cleanup -s --dry-run. Plan items gainreclaimable_bytes
andreclaim(size,measuredorupper_bound, with areclaim_note);
the summary gainsreclaimable_bytesand
reclaimable_bytes_is_upper_bound.size_bytesandplanned_byteskeep
the scan's sizes. When it can't be told (pnpm on APFS clones packages, so
no link count shows use) the size stays an "up to". Additive:
schema_versionstays 1. -
The pnpm store's older format folders (
v3beside pnpm 10'sv10) are
their own finding,pnpm-store-old, moved to the Trash:pnpm store pruneonly prunes the current format, so they were counted as prunable
and never freed. Thepnpm-storefinding is now the current format folder. -
When a cache's tool is no longer on PATH (Yarn, npm, bun, pip, uv, Go,
Homebrew, CocoaPods),cleanmoves the cache folder itself to the Trash
instead of skipping it, after the same re-checks as any trashed folder.
Never for the pnpm store or conda's package folder. -
lysosome mcp: a Model Context Protocol server on stdio, so Cursor, Codex,
Claude Code and other agents can callscan,worktrees,cachesand
clean(#57). Results are the same versioned JSON as--json.cleanis
a dry run unless the call passesconfirm: truewith exact item ids;
--permanentisn't reachable, and cleanups are logged with actormcp. -
clean --jsonresults and summary havetrashed_bytes: the part of
freed_bytesthat went to the Trash and still uses disk until it is
emptied. The human summary says how much is free now and how much is in
the Trash.summary.planned_bytes_is_upper_boundsays when the plan's
total is an "up to" (e.g.pnpm store prune). Additive:schema_version
stays 1, andfreed_byteskeeps its meaning. -
Home-folder finders for space no dev tool owns. A new category
app_caches(additive;summary.by_categorygains the key) holds
app-cache(each~/Library/Cachesfolder, or~/.cacheon Linux, that
no other detector reports),browser-cache(Chromium profile caches of
Chrome, Brave, Edge, Arc, Chromium and Vivaldi: onlyCache,Code Cache,GPUCache, Dawn and Service Worker caches, never profile data),
electron-cache(Slack, Discord, Teams, Notion, Figma, Postman, Obsidian,
Claude, Spotify) andcontainer-cache(macOS sandboxed apps'
Data/Library/Caches). All areregenerableand go to the Trash;
folders under 10 MB are left out, and anything written in the last day is
ACTIVE(quit the app first). Containers gainsdocker-scout-cache
(~/.docker/scout, cleaned withdocker scout cache prune --sboms) and
docker-disk-image: Docker Desktop'sDocker.raw, reported asREVIEW
with the space it holds beyond whatdocker system dfsays Docker uses
(details.image_bytes,details.docker_used_bytes), so it never double
counts the images listed above. lysosome never touchesDocker.raw. -
scan --summaryandworktrees --summary(MCP:summary: true,top):
totals by status, category and kind plus the--topbiggest items
instead of every finding (schema/summary.schema.json). A full scan of a
big folder was 2.5 MB of JSON, too much for an agent's context. -
Plan tokens:
clean --plan-tokensaves a dry run's exact items and
prints a token (plan_tokenin--json);clean --plan <token> --yes
cleans exactly those items, found again and re-checked, without retyping
ids. Tokens expire after an hour and work once. MCP dry runs always
return aplan_token, andcleantakesplanwithconfirm: true. -
MCP: a confirmed
cleanstill running after about 90 seconds
(LYSOSOME_MCP_WAIT_SECS) continues in the background and returns
{"status": "running", "job"}with progress; the newclean_status
tool returns the result. Long cleans no longer hit the client's
120-second timeout. -
clean --empty-own-trash: lists, and with--yespermanently deletes,
only the Trash entries lysosome itself moved there (from the action
log) that are still there; the rest of the Trash is never touched
(schema/empty-own-trash.schema.json).
Fixed
- A cleanup command that exits 0 but prints an error (
Error:,error:,
fatal:,npm ERR!) is reportedfailedwith that line, neverdone.
Homebrew does this for an untrusted tap; the message now says to run the
brew trust …command it names (or untap it) and clean again. - Cleaning several artifact folders of one idle project in one run cleans
them all. Moving the first to the Trash bumped its folder's mtime and (on
macOS) rewrote an untracked.DS_Store, so the re-check of the next one
saw "the project was used recently" and skipped it. Changes the run made
itself no longer count as use; real edits during the run still do. - The bun cache cleanup (
bun pm cache rm) no longer fails with "No
package.json was found": cleanup commands now run in an empty scratch
folder (never the folderlysosomewas started from), with a stub
package.jsonfor bun.
Changed
- The closing tip after
scanandcleanno longer calls the desktop app
free: it has been a paid app with a 14-day free trial since app 0.2.0. The
README's "Desktop app" section says the same.
Install lysosome 0.5.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/lysosome-dev/cli/releases/download/v0.5.1/lysosome-installer.sh | shInstall prebuilt binaries via Homebrew
brew install lysosomeDownload lysosome 0.5.1
| File | Platform | Checksum |
|---|---|---|
| lysosome-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| lysosome-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| lysosome-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
| lysosome-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
| lysosome-aarch64-unknown-linux-musl.tar.xz | ARM64 MUSL Linux | checksum |
| lysosome-x86_64-unknown-linux-musl.tar.xz | x64 MUSL Linux | checksum |