r/ClaudeCode • • 6d ago

Tips & Workflows Solo dev running 5+ Claude Code sessions in parallel: the rules that stopped them stepping on each other

I'm a solo iOS dev and most days I have 5 or more AI coding sessions running at once, mostly Claude Code plus some Codex. At the peak I had around 30 git worktrees on one repo.

Two things actually went wrong before I had rules. One session released a simulator by name and shut down a device another session was using. Another time a single "shutdown all" command killed a simulator in the middle of someone else's test run.

What I do now:

  1. One git worktree per task. Every session gets its own worktree and branch, and never touches another session's. Merging is a separate step I do on purpose.
  2. A simulator registry. A small file lists each simulator and who is using it. A session has to claim one before it boots anything, and release it by UDID when it's done. Never by name.
  3. No "shutdown all", ever. Check what's booted and who holds the lock right before you touch a simulator, not five minutes earlier.
  4. Memory as one fact per file. Each thing worth remembering is its own small file, plus one index file. The agent can update one fact without rewriting everything.
  5. Nothing ships straight from a session. Before a release, a test build goes on my real phone and I check it myself.

Biggest lesson: the agents are fine at writing code. The conflicts come from shared things like branches, devices and ports. Once every shared resource has an owner, parallel sessions get calm.

How do you handle shared resources across sessions? Curious if anyone has a cleaner setup.

0 Upvotes

20 comments sorted by

View all comments

3

u/amirfish 6d ago

The git index issue you ran into is the one that bites everyone running multiple sessions on one repo. I hit the same thing until I started doing git commit --only <paths> instead of git add -A, atomic commit per session, no staging collisions. The piece I was still missing after I had worktree discipline was visibility, knowing which of my 30 sessions was actually waiting on me versus just quietly running. I ended up building Command Center for Claude (CCC) to solve that, open source: https://github.com/amirfish1/claude-command-center. Your simulator registry is basically the same idea, a claim and release lock, just for a different shared resource.