explaingit

dagger/container-use

3,778GoAudience · developerComplexity · 3/5Setup · moderate

TLDR

An open-source tool that gives AI coding agents their own isolated containers and git branches, so multiple agents like Claude Code or Cursor can run in parallel without interfering with your codebase.

Mindmap

mindmap
  root((Container Use))
    What it does
      Isolated container per agent
      Separate git branch per agent
      Parallel agents safely
    How it works
      MCP server protocol
      One install command
      CLAUDE.md rules file
    Developer control
      Full command history
      Terminal into container
      Standard git review
    Supported agents
      Claude Code
      Cursor and Goose
    Install
      Homebrew on Mac
      Shell script on other platforms
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run multiple AI coding agents simultaneously on the same codebase without them conflicting with each other.

USE CASE 2

Let an agent experiment freely in an isolated container, then discard it if things go wrong without affecting your main project.

USE CASE 3

Inspect a stuck agent by opening a terminal directly into its container to see exactly what it did.

USE CASE 4

Review a completed agent run as a normal git branch and merge it the same way you would any branch.

Tech stack

GoDockerMCP

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Docker and an AI coding agent (like Claude Code or Cursor) that supports the MCP protocol.

In plain English

Container Use is an open-source tool that gives AI coding agents isolated environments to work in, so multiple agents can run at the same time without interfering with each other or with your main codebase. It is built by Dagger and is currently in early, experimental development. The core idea is that each agent gets its own fresh container (a self-contained computing environment, similar to a lightweight virtual machine) and its own git branch. When you run multiple agents simultaneously, they stay completely separate: one agent experimenting with a Python refactor will not touch what another agent is doing with the database schema. If an agent makes a mess, you discard that container and branch and nothing else is affected. It works as an MCP server, which is a standard protocol that AI tools like Claude Code and Cursor use to plug in external capabilities. You add Container Use to your agent as an MCP server with one command, and from that point the agent automatically uses containers for its work. You can also drop agent behavior rules into a CLAUDE.md file to guide how the agent interacts with the tool. From your side as a developer, you retain full visibility and control. You can see the complete history of every command an agent ran, not just its summary after the fact. If an agent gets stuck, you can open a terminal directly into its container to see its current state and take over. When an agent finishes, reviewing its work is a standard git checkout of its branch, and merging works the same way you would merge any branch. The tool works with Claude Code, Cursor, Goose, VSCode extensions, and any other agent that supports the MCP protocol. Installation is available through Homebrew on macOS or a shell script for other platforms.

Copy-paste prompts

Prompt 1
I want to set up Container Use as an MCP server for Claude Code. Show me the exact command to add it and a sample CLAUDE.md file for guiding agent behavior.
Prompt 2
My AI coding agent running in a container via Container Use got stuck. How do I open a terminal into its container to inspect its state?
Prompt 3
I'm running three parallel agents with Container Use. Walk me through reviewing each agent's git branch and deciding which changes to merge.
Prompt 4
Help me configure Container Use on macOS using Homebrew and connect it to Cursor as an MCP server.
Prompt 5
Write a CLAUDE.md file that tells an AI agent to always use Container Use for file changes, run tests before finishing, and commit to its own branch.
Open on GitHub → Explain another repo

← dagger on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.