Parallel Development with Claude Code Without git worktree (container-use) A developer has published a walkthrough of container-use, an MCP tool from Dagger that creates isolated per-branch development environments inside containers, allowing parallel Claude Code sessions without the extra directories that git worktree creates. The setup involves installing Dagger and container-use, registering the MCP server with `claude mcp add container-use -s user -- cu stdio`, and appending the project's agent.md rules to CLAUDE.md so Claude actually invokes the tool. Changes are pulled back into the local repo with `cu checkout `, with `cu list` and `cu log` tracking environments and operation history. You want to run multiple tasks in parallel with Claude Code, but you'd rather not have git worktree spawn a new directory every time. This post introduces "container-use," a tool that solves exactly that. container-use https://github.com/dagger/container-use is an MCP tool from Dagger. It creates isolated development environments inside containers on a per-branch basis, letting you do parallel development without polluting your local directory structure. | Aspect | git worktree | container-use | |---|---|---| | Directories | A new directory is created | Isolated inside a container | | Environment isolation | Files only | The whole environment | | Work log | Only git history | Operation history via cu log | | Compatibility with ghq | Tends to get messy | No impact | Arch Linuxの場合 sudo pacman -S dagger yay -S container-use For other OSes, see the official repository https://github.com/dagger/container-use . グローバルにMCPを追加 claude mcp add container-use -s user -- cu stdio 接続確認 claude mcp list If you see the following, you're good to go. container-use: cu stdio - ✓ Connected The official docs mark this as "optional," but without it Claude won't actually use container-use. curl https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md CLAUDE.md If you'd rather not get a confirmation prompt every time, launch with the following options. claude --allowedTools mcp container-use environment checkpoint,mcp container-use environment create,mcp container-use environment add service,mcp container-use environment file delete,mcp container-use environment file list,mcp container-use environment file read,mcp container-use environment file write,mcp container-use environment open,mcp container-use environment run cmd,mcp container-use environment update | Command | Description | |---|---| | cu list | List environments | | cu log