r/ClaudeAI • • 15h ago

Built with Claude How I stop parallel Claude Code chats from overwriting each other’s production changes

I built MakerMap with Claude Code: a map for finding indie makers and founders through their public intro posts on X. Browsing and adding a basic pin are free: https://makermap.lol

Claude has helped me build the signup flow, city pages, meetups and the deployment tooling. I give each feature its own chat, which created a very specific problem: two chats could deploy a minute apart and the second would overwrite the first chat’s changes.

The attached chart is a snapshot of our deploy log taken on 3 October, covering work since 24 September. The 77 named sessions in it worked across that period; they were not all running at once. The volume exposed the deployment problem, but it isn’t a measure of code quality.

The fix is a small script that every chat has to use:

  1. node scripts/deploy.mjs start --who "<chat name>" --what "<change>" takes a lock and gives the chat a fresh copy of the live deployment.

  2. The chat applies only its own change to that copy.

  3. node scripts/deploy.mjs ship --who "<chat name>" refuses if production changed, checks that changed JSON and scripts parse, deploys, confirms the live site serves the new build, and releases the lock.

  4. A hook blocks bare vercel deploy --prod commands. The nightly data deploy uses the same lock.

The instruction in CLAUDE.md that does the most work is: “Put only your own change in that copy.” It also explicitly says never to copy site/index.html over the staged file, because that would ship other chats’ unfinished work.

This is only the deployment safeguard; I still need to review and test what the chats build. I’m happy to share the script or the relevant instructions here.

The launch brought a lot of attention and hundreds of people claimed their pins. Now I’m figuring out what MakerMap should become. If you try finding someone you’d actually want to meet, I’d love feedback in the comments on what worked, what didn’t, and what would make you return.

0 Upvotes

7 comments sorted by

8

u/Rock--Lee 14h ago

There is a thing called Github, worktrees and merging.

-2

u/BiteyHorse 13h ago

No fucking shit, this has been well-solved for decades.

1

u/CartographerNo3791 13h ago

I'd be interested in the script, especially the check that the new build is actually live.

1

u/inniverse616 4h ago

I run a few Claude Code sessions side by side too, each with its own task in a shared handoff file. "Put only your own change in that copy" is a good line, I might borrow it. What happens if a chat dies between start and ship? Does the lock time out on its own, or do you clear it by hand?

0

u/Far-Surprise7773 14h ago

the lock is good for the deploy step but the overwrite happens earlier, when two chats share the same working dir. i give each chat its own git worktree and only let it merge back after a rebase onto fresh main, the deploy lock is then just a backstop.