| Error | Cause | Solution |
|---|---|---|
CWSandboxAuthenticationError | Missing or invalid credentials | Check the credential for your selected authentication method |
SandboxNotRunningError | Operation on stopped sandbox | Check sandbox.status before operations |
SandboxTimeoutError | Operation exceeded timeout | Increase timeout_seconds or optimize command |
SandboxTerminatedError | This client called stop(), or a legacy backend reported TERMINATED | For an expected stop, use wait_until_complete(raise_on_termination=False); see termination handling |
SandboxFailedError | Sandbox reached FAILED, including startup or runtime failure or maximum lifetime expiry | Check the error details, container image, resources, and max_lifetime_seconds. If your SDK exposes status_reason, check it on the sandbox or exception. It can be None when the backend reports no reason |
SandboxNotFoundError | Sandbox deleted or never existed | Verify sandbox ID is correct |
SandboxExecutionError | Command returned non-zero (with check=True) | Check e.exec_result.stderr for details |
SandboxFileError | File operation failed | Check file path and permissions |
TypeError: Function arguments are not JSON-serializable | A remote function argument isn’t serializable to JavaScript Object Notation (JSON) | Before you call the remote function, convert the argument to JSON-compatible values. Pickle isn’t supported for remote-function arguments or return values |
AsyncFunctionError | Async function passed to @session.function() | Use sync functions only |
What do common sandbox SDK error messages mean?
The following table summarizes the most common exceptions that the SDK raises, along with their typical causes and recommended fixes.
Server Errors
Last modified on November 18, 2026