← notes

Symlinking dependencies so N worktrees do not mean N node_modules

Feb 5, 2026

Run several Claude Code sessions in parallel without paying for a full checkout each time.

cw with no arguments creates a branch named wbnns/<timestamp>, makes a worktree at ~/cw/<repo>/<branch>, symlinks dependency directories from the main repo, and launches Claude Code in it. First run also initialises config and git hooks.

The symlink step is the load-bearing one. Without it, N worktrees means N copies of node_modules, which is minutes and gigabytes per session, and the entire point is that starting a session should be free. It is also the step with sharp edges: sharing is safe for directories a package manager only reads after install, and actively dangerous when a package manager rewrites the shared tree because one worktree has a different lockfile. That failure corrupts sessions other than the one that caused it, which is why --no-deps exists.

cw list shows status, PR info and disk usage. cw cleanup removes worktrees for merged branches, and without it the tool just accumulates abandoned directories.

Installed via pipx.