One node_modules, fifteen worktrees
Measured on this checkout, 2026-08-04. Numbers below are real, not projected.
Before
5,201 MB
15 worktrees, each with its own copy.
A fresh worktree needed five separate npm installs before it could run anything,
and two worktrees had no node_modules at all, so they could not run tsc.
After
2,062 MB
One installed tree in the main repository,
symlinked into every worktree by Claude Code at creation time.
70 links written, 3,139 MB reclaimed, 0 installs.
| Surface | Was | Now | Effect |
| New worktree setup |
5 x npm install |
5 symlinks |
minutes to instant |
| Disk across worktrees |
5,201 MB |
2,062 MB |
-60% |
| Config drift |
ungated, file is gitignored |
tracked list + CI test |
fails closed |
| Dependency isolation |
per worktree |
shared with main repo |
traded away |
bin/worktree-config.sh --apply write .claude/settings.json from the tracked list
bin/worktree-config.sh --check fail if the live config drifted
bin/worktree-reclaim.sh --dry-run show which existing worktrees are still duplicating
bin/worktree-reclaim.sh --apply backfill the layout onto them
The trade-off is real and is not hidden. Symlinked worktrees share one
installed tree, so an npm install inside a worktree writes into the main
repository. If a branch needs a genuinely different dependency graph, drop
its entry rather than pretending the isolation is still there.