Common Errors
401 Unauthorized
Your API key is missing or invalid.
- Check that
OPENCOMPUTER_API_KEYis set:echo $OPENCOMPUTER_API_KEY - Verify the key in your code matches what’s in the dashboard
- CLI users: run
oc config showto check the stored key
Sandbox not found
The sandbox may have been killed or timed out (auto-hibernated or stopped).
Connection refused
The sandbox is still starting up, or it’s hibernated and hasn’t finished waking.
- Check the sandbox status — if
hibernated, callwake()oroc sandbox wake - If just created, wait a moment for the VM to boot (~150ms typical)
Timeout errors
Command timeout: Increase thetimeout parameter on exec.run() or use --timeout with oc exec. Default is 60s for SDK exec.run(), unlimited for CLI without --wait.
Idle timeout: Sandboxes auto-hibernate after 300s of inactivity. Increase with sandbox.setTimeout() or oc sandbox set-timeout. The timeout resets on every operation.
Agent exits immediately
- Check that the sandbox has the Claude Agent SDK installed (the default template includes it)
- Verify
ANTHROPIC_API_KEYis available — pass it viaenvson sandbox create if the agent needs it - Use the
onErrorcallback to capture stderr from the agent process
Debugging Tips
Check sandbox status
List running processes
Capture agent errors
Read sandbox logs
Getting Help
- GitHub Issues: github.com/diggerhq/opencomputer/issues
- API Reference: HTTP API · TypeScript SDK · Python SDK · CLI