Hacker News new | ask | show | jobs
by zjy71055 12 days ago
git worktree (or any COW snapshot like this) still leaves you reinstalling node_modules per tree and fighting over a dev server port. That's the actual cost, and none of these tools touch it. So I gave up on parallelizing inside one repo. I run agents across different projects — one repo each — and stay serial within a single project.
3 comments

CoW doesn't require reinstall of dependencies as they're part of the same directory tree, so should be immediately accessible (I've been using this way for a couple months now and it works fine)

The application running (port config) problem is an issue for frameworks and build tools to figure out around the shift towards multiple live working copies at once

The tools that facilitate this will win imo

I use Laravel Herd along with Polyscope (made by the same company). Together they enable CoW clones with their own dev domains - it's zero setup and works super well for my use-case

I can see a simpler version of the same thing being very neat dev experience across many stacks

you are right, I've experimented with cp -a on macOS as well for https://github.com/madarco/agentbox and in the end found it's actually faster to use worktrees inside docker containers while mounting your .git repo inside them.

Then after the node_modules (or apt packages) are installed, take a docker commit snapshot.

Now I have truly isolated parallel workspaces in <10s.

Also the system was easy to adapt to cloud environments as well so now I have Hetzner, Vercel, Daytona as well (using their native snapshotting systems for fast boot after the initial setup)

This! A hundred times over. It's hard enough having to review one serial set of changes managing parallel changes into a single code base has been a nightmare load on my brain so I avoid that unless I'm trying to prototype something quick and dirty.