Skip to content

Devcontainer Support

CACD can run your AI agent sessions inside devcontainers. This is useful for sandboxing agent actions or working in projects that require a specific development environment.

When you provide devcontainer commands, CACD will:

  1. Start the devcontainer using your up command
  2. Run the AI agent inside the container using your exec command
  3. Stream the terminal output back to CACD’s interface

CACD doesn’t create or manage the devcontainer configuration - it just interfaces with existing setups.

  • A project with a .devcontainer/devcontainer.json or similar setup
  • The devcontainer CLI installed (or whatever tool manages your containers)
  • Your container configured with the AI agents you want to use

Start CACD with the devcontainer flags:

Terminal window
cacd --devc-up-command "devcontainer up --workspace-folder ." \
--devc-exec-command "devcontainer exec --workspace-folder ."

Both flags are required - you can’t use just one.

  • --devc-up-command - Command to start the devcontainer (runs before session creation)
  • --devc-exec-command - Command prefix for running commands inside the container

Say you have a Node.js project with a devcontainer. You want Claude Code to run inside it:

Terminal window
cd /path/to/my-project
cacd --devc-up-command "devcontainer up --workspace-folder ." \
--devc-exec-command "devcontainer exec --workspace-folder ."

When you create a Claude session, CACD will:

  1. Run devcontainer up --workspace-folder . to ensure the container is running
  2. Run devcontainer exec --workspace-folder . -- claude to start Claude inside the container

A common reason to use devcontainers is security. You can run Claude with --dangerously-skip-permissions inside a sandboxed container where it can’t access your host filesystem or network:

Terminal window
cacd --devc-up-command "devcontainer up --workspace-folder ." \
--devc-exec-command "devcontainer exec --workspace-folder ."

Then configure your Claude agent profile to include the YOLO flag. The agent runs unrestricted, but only inside the container.

  • You need to set up the devcontainer separately - CACD doesn’t create them
  • The container needs the AI agents pre-installed or accessible
  • Performance depends on your container setup