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.
What This Does
Section titled “What This Does”When you provide devcontainer commands, CACD will:
- Start the devcontainer using your up command
- Run the AI agent inside the container using your exec command
- Stream the terminal output back to CACD’s interface
CACD doesn’t create or manage the devcontainer configuration - it just interfaces with existing setups.
Requirements
Section titled “Requirements”- A project with a
.devcontainer/devcontainer.jsonor similar setup - The
devcontainerCLI installed (or whatever tool manages your containers) - Your container configured with the AI agents you want to use
Start CACD with the devcontainer flags:
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
Example
Section titled “Example”Say you have a Node.js project with a devcontainer. You want Claude Code to run inside it:
cd /path/to/my-projectcacd --devc-up-command "devcontainer up --workspace-folder ." \ --devc-exec-command "devcontainer exec --workspace-folder ."When you create a Claude session, CACD will:
- Run
devcontainer up --workspace-folder .to ensure the container is running - Run
devcontainer exec --workspace-folder . -- claudeto start Claude inside the container
Use Case: Sandboxed Execution
Section titled “Use Case: Sandboxed Execution”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:
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.
Limitations
Section titled “Limitations”- 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