{"slug": "parallel-development-with-claude-code-without-git-worktree-container-use", "title": "Parallel Development with Claude Code Without git worktree (container-use)", "summary": "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 <env_id>`, with `cu list` and `cu log` tracking environments and operation history.", "body_md": "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.\n\n[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.\n\n| Aspect | git worktree | container-use | \n|---|---|---|\n| Directories | A new directory is created | Isolated inside a container | \n| Environment isolation | Files only | The whole environment | \n| Work log | Only git history | Operation history via `cu log` | \n| Compatibility with ghq | Tends to get messy | No impact | \n\n```\n# Arch Linuxの場合\nsudo pacman -S dagger\nyay -S container-use\n```\n\nFor other OSes, see the [official repository](https://github.com/dagger/container-use).\n\n```\n# グローバルにMCPを追加\nclaude mcp add container-use -s user -- cu stdio\n\n# 接続確認\nclaude mcp list\n```\n\nIf you see the following, you're good to go.\n\n```\ncontainer-use: cu stdio - ✓ Connected\n```\n\nThe official docs mark this as \"optional,\" but without it Claude won't actually use container-use.\n\n```\ncurl https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md >> CLAUDE.md\n```\n\nIf you'd rather not get a confirmation prompt every time, launch with the following options.\n\n```\nclaude --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\n```\n\n| Command | Description | \n|---|---|\n| `cu list` | List environments | \n| `cu log <env_id>` | View the work log | \n| `cu checkout <env_id>` | Apply changes to a local branch | \n| `cu open <env_id>` | Open an existing environment | \n| `cu config` | Change settings like the base image | \n\nOnce development is done, pull the changes from the container into your local repo with:\n\n```\ncu checkout <env_id>\n```\n\nHere's a concrete example.\n\nOpen two terminals and start a separate Claude Code session in each.\n\n``` bash\n$ claude\n> Issue #42のバグを修正して\nbash\n$ claude\n> Issue #58の機能を実装して\n```\n\nEach Claude works inside its own container-use environment, so they don't step on each other.\n\n```\n1. Claudeが作業完了を報告\n   ↓\n2. cu list で環境IDを確認\n   ↓\n3. cu checkout <env_id> で変更を取り込み\n   ↓\n4. 通常通りレビュー → マージ\n```\n\nThe more efficient parallel development gets, the faster review requests pile up.\n\nAs noted above, if you don't append the contents of `agent.md` to CLAUDE.md, Claude won't recognize container-use. Keep in mind that this has to be set up per project.\n\nWith container-use, you can do parallel development in Claude Code without scattering directories the way git worktree does.\n\nParticularly recommended if you keep your repositories nicely organized with ghq.\n\n*This post was written with AI assistance and reviewed by the author.*", "url": "https://wpnews.pro/news/parallel-development-with-claude-code-without-git-worktree-container-use", "canonical_source": "https://dev.to/kohei_wada/parallel-development-with-claude-code-without-git-worktree-container-use-564o", "published_at": "2026-10-16 15:38:21+00:00", "updated_at": "2026-10-16 15:47:48.492448+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "agent-protocols", "mlops"], "entities": ["Claude Code", "container-use", "Dagger", "git worktree", "ghq", "MCP", "Arch Linux"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/parallel-development-with-claude-code-without-git-worktree-container-use", "markdown": "https://wpnews.pro/news/parallel-development-with-claude-code-without-git-worktree-container-use.md", "text": "https://wpnews.pro/news/parallel-development-with-claude-code-without-git-worktree-container-use.txt", "jsonld": "https://wpnews.pro/news/parallel-development-with-claude-code-without-git-worktree-container-use.jsonld"}}