content/manuals/ai/sandboxes/troubleshooting.md
{{< summary-bar feature_name="Docker Sandboxes" >}}
This guide helps you resolve common issues when using Docker Sandboxes with AI coding agents.
<!-- vale off -->When you run docker sandbox, you see an error saying the command doesn't exist.
This means the CLI plugin isn't installed or isn't in the correct location. To fix:
Verify the plugin exists:
$ ls -la ~/.docker/cli-plugins/docker-sandbox
The file should exist and be executable.
If using Docker Desktop, restart it to detect the plugin.
You see an error about beta features being disabled when trying to use sandboxes.
This happens when your Docker Desktop installation is managed by an administrator who has locked settings. If your organization uses Settings Management, ask your administrator to allow beta features:
{
"configurationFileVersion": 2,
"allowBetaFeatures": {
"locked": false,
"value": true
}
}
Claude can't authenticate, or you see API key errors.
The API key is likely invalid, expired, or not configured correctly.
You see a warning about conflicting credentials when starting a sandbox.
This happens when your workspace has a .claude.json file with a primaryApiKey field. Choose one of these approaches:
Remove the primaryApiKey field from your .claude.json:
{
"apiKeyHelper": "/path/to/script",
"env": {
"ANTHROPIC_BASE_URL": "https://api.anthropic.com"
}
}
Or proceed with the warning - workspace credentials will be ignored in favor of sandbox credentials.
Claude or commands fail with "Permission denied" errors when accessing files in the workspace.
This usually means the workspace path isn't accessible to Docker, or file permissions are too restrictive.
If using Docker Desktop:
Check File Sharing settings at Docker Desktop → Settings → Resources → File Sharing.
Ensure your workspace path (or a parent directory) is listed under Virtual file shares.
If missing, click "+" to add the directory containing your workspace.
Restart Docker Desktop.
For all platforms, verify file permissions:
$ ls -la <workspace>
Ensure files are readable. If needed:
$ chmod -R u+r <workspace>
Also verify the workspace path exists:
$ cd <workspace>
$ pwd
On Windows, launching too many sandboxes simultaneously can cause crashes.
If this happens, recover by closing the OpenVMM processes:
docker.openvmm.exe processes.To avoid this issue, launch sandboxes one at a time rather than creating multiple sandboxes concurrently.
If sandboxes behave unexpectedly or fail to start, reset all sandbox state:
$ docker sandbox reset
This stops all running VMs and deletes all sandbox data. The daemon continues running. After reset, create fresh sandboxes as needed.
Use reset when troubleshooting persistent problems or to reclaim disk space from all sandboxes at once.