Orchestration Tool Deep Dive

Container Use
by Dagger

Sandboxed dev environments for coding agents. Each agent gets its own container and git branch — work in parallel without getting in your way.

Go Built with
3.6k GitHub Stars
MCP Integration
Dagger By

What Is Container Use?

Container Use is an open-source MCP server that gives each coding agent its own containerized environment and git worktree, enabling safe parallel agent execution with full observability.

The Problem It Solves

Running multiple AI coding agents simultaneously creates chaos: they corrupt each other's files, clobber shared state, consume unpredictable resources, and produce irreversible host system changes. Container Use eliminates these problems by giving each agent its own isolated sandbox.

Who Built It

Container Use comes from Dagger, the company founded by Solomon Hykes (creator of Docker). Built on Dagger's container pipeline engine, it applies the same containerization philosophy to AI coding agents. Released May 2025, it has rapidly gained traction with 3.6k+ GitHub stars and 32 contributors.

Supported Agents

Container Use works with any MCP-compatible agent through its stdio-based MCP server. Documented integrations include:

  • Claude Code — primary integration
  • Cursor — via MCP config
  • Goose — via .goosehints
  • VS Code — via MCP-compatible extension
  • Any other MCP-compatible coding agent

Run coding agents in parallel without destroying everything. Each agent gets its own environment.

— Dagger blog, announcing Container Use

Architecture

Container Use combines Dagger's container engine with Git worktrees to provide isolation at both the filesystem and version control level.

Architecture: MCP Server (container-use stdio) | v Dagger Engine (container orchestration) | +-- Environment A [container + git worktree: cu-fancy-mallard] | +-- Environment B [container + git worktree: cu-swift-eagle] | +-- Environment C [container + git worktree: cu-bold-falcon] Each environment has: Isolated filesystem Independent process namespace Dedicated git branch Controlled network access Full command history Disposable after completion
MCP

MCP-Native

Implements the Model Context Protocol as a stdio server. Any MCP-compatible agent can connect without custom integration code.

Core

Git Worktrees

Each environment gets its own git branch (e.g., cu-fancy-mallard). Review agent work with standard git commands.

Safety

Ephemeral Containers

Containers are disposable. Spin up, let the agent work, extract results, destroy. No persistent host changes.

Installation & Setup

# macOS (recommended) brew install dagger/tap/container-use # All platforms curl -fsSL https://raw.githubusercontent.com/dagger/container-use/main/install.sh | bash

Add to Claude Code

# Register as MCP server cd /path/to/repository claude mcp add container-use -- container-use stdio # Optional: add agent rules for better behavior curl https://raw.githubusercontent.com/dagger/container-use/main/rules/agent.md >> CLAUDE.md

Project Configuration

Container Use stores project config in .container-use/environment.json — commit this directory to share setup with your team.

# Set a base image container-use config base-image set python:3.11 # Add setup commands (run before code is copied) container-use config setup-command add "apt-get update && apt-get install -y ffmpeg" # Add install commands (run after code is copied) container-use config install-command add "pip install -r requirements.txt" # Set environment variables container-use config env set NODE_ENV development # Configure secrets container-use config secret set API_KEY

Key Features

Container Use focuses on a small set of things done well: isolation, observability, and standard git workflow integration.

Core

Isolated Environments

Every agent receives a fresh container on its own git branch. Parallel agents never conflict — each has full filesystem independence.

Core

Real-time Visibility

Full command history and logs show what agents actually did. Use cu watch for live monitoring across all active environments.

Power

Direct Intervention

cu terminal <env-id> drops you into any agent's container. Inspect state, debug issues, or take manual control.

Core

Standard Git Workflow

Merge with cu merge, stage with cu apply, or checkout with cu checkout. No proprietary review interface.

MCP

Universal Compatibility

No vendor lock-in. Works with any MCP-compatible agent, model, or infrastructure. One interface for all agents.

Config

Secrets Management

Secure handling of API keys and credentials via 1Password integration, environment variables, and file references.

CLI Commands

The container-use command is also available as cu for convenience.

Environment Management

CommandDescription
cu listList all environments (--no-trunc for full output, -q for IDs only)
cu log <id>Show commit history and executed commands (--patch for diffs)
cu diff <id>Compare environment to its base branch
cu watchReal-time monitoring of all active environments
cu terminal <id>Open interactive shell inside the container
cu delete <id>Delete an environment (--all to delete everything)

Code Integration

CommandDescription
cu checkout <id>Switch to environment's branch (-b for custom name)
cu merge <id>Merge environment commits into current branch (-d to auto-delete)
cu apply <id>Stage changes without committing (-d to auto-delete)

Configuration

CommandDescription
cu config showDisplay current configuration
cu config base-imageGet, set, or reset base image (default: ubuntu:24.04)
cu config setup-commandAdd/remove/list/clear pre-code setup commands
cu config install-commandAdd/remove/list/clear post-code install commands
cu config envSet/unset/list/clear environment variables
cu config secretSet/unset/list/clear secrets
cu config agentConfigure MCP for specific agent (claude, goose, cursor)
cu stdioStart the MCP server (used in agent config, not manually)

Environment ID Formats

Environments can be referenced by:

  • Full name: fancy-mallard
  • Partial (if unique): fancy
  • Branch name: cu-fancy-mallard

Example Workflow

A typical workflow: you prompt your agent, it works in isolation, and you review/merge when ready.

01

Install and register

brew install dagger/tap/container-use then claude mcp add container-use -- container-use stdio

02

Prompt your agent

Ask Claude Code to build something: "Create a hello world app in Python using Flask." Container Use automatically creates an isolated environment.

03

Agent works in isolation

The agent gets a fresh container with its own git branch (e.g., cu-fancy-mallard). It can install packages, write files, run tests — all without touching your host.

04

Monitor progress

cu watch shows real-time activity across all environments. cu log <id> shows detailed command history.

05

Review and merge

cu diff <id> to see what changed. cu merge <id> -d to merge and clean up. Standard git from here.

Container Use reframes agent execution as a containerized, stateless operation — borrowing from CI/CD pipeline thinking — so teams can safely parallelize AI coding workflows at scale.

— Dagger engineering blog

Limitations & Considerations

Early Development

Explicitly flagged as "experimental" and "actively evolving." APIs and behavior may change between releases. Currently at v0.4.2.

Dagger Dependency

Built on the Dagger engine, which is an additional runtime dependency. Not a simple Docker container — it's a full pipeline engine.

No Task Queue

Unlike TSK, Container Use doesn't have built-in task queuing or chaining. It provides environments, not workflow orchestration.

No Built-in TUI

cu watch provides monitoring, but there's no interactive TUI dashboard for managing multiple environments simultaneously.

MCP-Only Integration

Agents must support MCP to use Container Use. Non-MCP agents cannot integrate without a compatibility layer.

Container Overhead

Each environment runs a full container with its own copy of the codebase. Resource-intensive for large repos or many parallel agents.

Container Use vs TSK

Both tools provide containerized agent isolation, but with different philosophies.

FeatureContainer UseTSK
IntegrationMCP server (universal)CLI tool (direct)
Task queueNoYes, with server mode
Task chainingNoYes, via --parent
Task templatesNoYes, Markdown templates
Multi-agent comparisonNoYes, --agent codex,claude
Interactive shellcu terminaltsk shell
Real-time monitoringcu watchTUI dashboard
Agent supportAny MCP agentClaude Code + Codex only
Installationbrew installcargo install
Network isolationContainer-levelSquid proxy with ACLs
LanguageGoRust
MaturityExperimental (v0.4.2)Early

Links & Resources

Official

Articles & Coverage

  • Dagger Blog — "Run Coding Agents in Parallel without Destroying Everything"
  • InfoQ — "Container Use: a New Tool for Isolated, Parallel Coding Agents"
  • The New Stack — "AI Dev Tools: How To Containerize Agents Using Dagger"

Community

  • Discord: container-use.com/discord (#container-use channel)
  • Contributors: 32
  • License: Apache-2.0
  • Current version: v0.4.2 (14 releases total)