Menu

Claude Code Worktree: Run Multiple Agents in Parallel Without Collisions
📰

Claude Code Worktree: Run Multiple Agents in Parallel Without Collisions

DEV Community: docker·flisk·11 days ago
#QHxTQ47o
#devtodocker#devto#dev#worktree#flisk
Long article (470 words) — no AI summary yet.
Reading 0:00
15s threshold

TL;DR: a git worktree gives each Claude Code agent its own folder and branch. It does not give it its own ports, container names or database volume. We tested two worktrees of one project running the same local stack and wrote down what broke and the config that fixes it.

If you search Claude Code worktree or Claude Code multiple agents in parallel , the advice is to add git worktree add ../agent-feature . That part works. The stack each agent runs is the part that collides.

What we tested

Two worktrees of one repo, each running an API on port 3456 and a Redis container, started with flisk up . The test used Flisk CLI v1.4.47, Docker Engine 29.8.2, macOS on Apple silicon, on 2026-11-10. Flisk is a command-line tool that starts a multi-service app locally.

Three collisions

Container names. Both worktrees inherit the same project name from .flisk/project.json , so both want the container flisk-<project>-redis .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.