# Sandbox diagnostics

<!-- Generated by docs/modules/diagnostics from the package catalogs. Write a guide in docs/diagnostics/<CODE>.md instead of editing this file. -->

Each Sandbox error has a stable `code`. Its `docs` link opens the page of that code. This page lists all 215 codes, and [All diagnostics](https://vitehub.dev/docs/reference/diagnostics) lists every primitive.

## Runtime errors

| Code | What happened |
| --- | --- |
| [`SANDBOX_R0020`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0020) | The cloudflare Sandbox runtime requires a Durable Objects namespace. |
| [`SANDBOX_R0022`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0022) | Cloudflare failed to create \<path\>. |
| [`SANDBOX_R0023`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0023) | See the page of the code. |
| [`SANDBOX_R0024`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0024) | Cloudflare failed to move \<source\>. |
| [`SANDBOX_R0025`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0025) | Cloudflare failed to read \<path\>. |
| [`SANDBOX_R0026`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0026) | Cloudflare failed to remove \<path\>. |
| [`SANDBOX_R0027`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0027) | See the page of the code. |
| [`SANDBOX_R0028`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0028) | Cloudflare failed to write \<path\>. |
| [`SANDBOX_R0029`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0029) | See the page of the code. |
| [`SANDBOX_R0030`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0030) | Custom Sandbox runtimes cannot use the reserved name "\<name\>". Select the built-in runtime by value instead. |
| [`SANDBOX_R0031`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0031) | Unknown Sandbox runtime "\<value\>". Expected "crabbox", "trusted-host", "vercel", a tagged built-in configuration, or a custom runtime. |
| [`SANDBOX_R0032`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0032) | Sandbox requires an explicit built-in runtime value or custom runtime object. |
| [`SANDBOX_R0033`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0033) | Unknown Sandbox runtime kind "\<kind\>". Expected "crabbox", "trusted-host", "cloudflare", "container", or "vercel". |
| [`SANDBOX_R0034`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0034) | Sandbox requires a definition. |
| [`SANDBOX_R0035`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0035) | Sandbox checkout cannot be combined with cwd. |
| [`SANDBOX_R0036`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0036) | Sandbox runtime \<name\> must declare executionAuthority. |
| [`SANDBOX_R0037`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0037) | Sandbox runtime \<name\> must declare an opaque Home state identity for \<path\>. |
| [`SANDBOX_R0038`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0038) | Sandbox home must be a declarative object. |
| [`SANDBOX_R0039`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0039) | Invalid Sandbox environment variable: \<name\> |
| [`SANDBOX_R0040`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0040) | \<name\> is managed by the Sandbox runtime. |
| [`SANDBOX_R0041`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0041) | Sandbox environment value \<name\> is required. |
| [`SANDBOX_R0042`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0042) | Sandbox state \<path\> requires a non-empty key. |
| [`SANDBOX_R0043`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0043) | Sandbox state keys must be unique: \<key\> |
| [`SANDBOX_R0044`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0044) | Sandbox file \<path\> requires from or contents. |
| [`SANDBOX_R0045`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0045) | Sandbox file \<path\> requires exactly one of from or contents. |
| [`SANDBOX_R0046`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0046) | Sandbox file \<path\> requires exactly one of from or contents. |
| [`SANDBOX_R0047`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0047) | Sandbox file \<path\> is required. |
| [`SANDBOX_R0048`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0048) | Sandbox file \<path\> must resolve to text or bytes. |
| [`SANDBOX_R0049`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0049) | Sandbox project file is unavailable: \<path\> |
| [`SANDBOX_R0050`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0050) | Sandbox \<label\> targets conflict: \<value\> and \<value\> |
| [`SANDBOX_R0051`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0051) | Sandbox state targets overlap: \<value\> and \<value\> |
| [`SANDBOX_R0052`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0052) | Sandbox file and state targets conflict: \<file\> and \<directory\> |
| [`SANDBOX_R0053`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0053) | Sandbox \<label\> must be an object. |
| [`SANDBOX_R0054`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0054) | Sandbox \<label\> must be a non-empty relative POSIX path. |
| [`SANDBOX_R0055`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0055) | Sandbox \<label\> must be a non-empty relative POSIX path. |
| [`SANDBOX_R0056`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0056) | Sandbox requirements must be non-empty commands. |
| [`SANDBOX_R0057`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0057) | Sandbox requirement commands and arguments cannot contain NUL. |
| [`SANDBOX_R0058`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0058) | Sandbox requirements must be commands or direct command checks. |
| [`SANDBOX_R0059`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0059) | Sandbox requirement arguments must be an array of strings. |
| [`SANDBOX_R0060`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0060) | Sandbox requirement commands and arguments cannot contain NUL. |
| [`SANDBOX_R0061`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0061) | Sandbox requirement timeout must be a positive integer no greater than 2147483647ms. |
| [`SANDBOX_R0062`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0062) | Sandbox \<label\> must resolve to a non-empty string. |
| [`SANDBOX_R0063`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0063) | Sandbox \<label\> cannot contain NUL. |
| [`SANDBOX_R0064`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0064) | Sandbox checkout sha must be a full Git object id. |
| [`SANDBOX_R0088`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0088) | Cloudflare Sandbox \<operation\> failed: \<value\> |
| [`SANDBOX_R0090`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0090) | Cloudflare Sandbox \<operation\> timed out after \<timeout\>ms. |
| [`SANDBOX_R0091`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0091) | The crabbox runtime requires sandbox.cwd or sandbox.checkout. |
| [`SANDBOX_R0092`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0092) | The crabbox runtime requires an absolute stateRoot when sandbox.home.state is declared. |
| [`SANDBOX_R0093`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0093) | Sandbox stateRoot must be a dedicated directory, not the filesystem root. |
| [`SANDBOX_R0094`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0094) | Sandbox workspace directory does not exist: \<workspace\> |
| [`SANDBOX_R0095`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0095) | Crabbox returned an invalid session root: \<value\> |
| [`SANDBOX_R0096`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0096) | Crabbox returned an invalid workspace path: \<value\> |
| [`SANDBOX_R0097`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0097) | Sandbox stateRoot must resolve to a dedicated target directory. |
| [`SANDBOX_R0098`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0098) | Sandbox stateRoot must be outside the authoritative workspace. |
| [`SANDBOX_R0100`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0100) | Crabbox returned an empty command PATH. |
| [`SANDBOX_R0101`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0101) | Crabbox returned an empty command user. |
| [`SANDBOX_R0102`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0102) | Crabbox state lease was lost. |
| [`SANDBOX_R0103`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0103) | Failed to acquire Crabbox state lease\<value\> |
| [`SANDBOX_R0104`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0104) | Crabbox state lease was lost\<value\> |
| [`SANDBOX_R0105`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0105) | Crabbox state lease aborted. |
| [`SANDBOX_R0106`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0106) | Failed to release Crabbox state lease (exit \<exitCode\>). |
| [`SANDBOX_R0107`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0107) | Sandbox returned an invalid file entry for \<path\>. |
| [`SANDBOX_R0108`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0108) | Crabbox warmup did not return a lease id. |
| [`SANDBOX_R0109`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0109) | Crabbox returned an invalid tunnel URL. |
| [`SANDBOX_R0110`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0110) | Crabbox tunnel failed\<value\> |
| [`SANDBOX_R0111`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0111) | Crabbox command aborted. |
| [`SANDBOX_R0112`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0112) | Invalid Sandbox environment variable: \<name\> |
| [`SANDBOX_R0113`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0113) | Sandbox commands cannot override \<name\>. |
| [`SANDBOX_R0114`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0114) | Crabbox path escapes the session root: \<path\> |
| [`SANDBOX_R0115`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0115) | Crabbox workspace archive conflicts with local symlink: \<path\> |
| [`SANDBOX_R0116`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0116) | Crabbox workspace archive contains an invalid path: \<path\> |
| [`SANDBOX_R0117`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0117) | Failed to \<action\>\<value\> |
| [`SANDBOX_R0118`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0118) | Crabbox tunnel exited before readiness. |
| [`SANDBOX_R0119`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0119) | Sandbox checkout revision mismatch: expected \<sha\>, received \<value\>. |
| [`SANDBOX_R0120`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0120) | Sandbox checkout Git command exited with code \<exitCode\>. |
| [`SANDBOX_R0121`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0121) | See the page of the code. |
| [`SANDBOX_R0122`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0122) | \<runtime\> cannot mount a host Sandbox cwd; use Workspace instead. |
| [`SANDBOX_R0123`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0123) | \<runtime\> does not provide durable Sandbox Home state. |
| [`SANDBOX_R0124`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0124) | Sandbox requirement "\<name\>" failed\<value\> |
| [`SANDBOX_R0125`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0125) | Sandbox session is closed. |
| [`SANDBOX_R0126`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0126) | Sandbox command timeout must be a positive number. |
| [`SANDBOX_R0127`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0127) | Sandbox commands must be non-empty and cannot contain NUL. |
| [`SANDBOX_R0128`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0128) | Sandbox command arguments cannot contain NUL. |
| [`SANDBOX_R0129`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0129) | Sandbox ports must be integers between 1 and 65535. |
| [`SANDBOX_R0130`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0130) | The trusted-host runtime requires stateRoot to be an absolute path when sandbox.home.state is declared. |
| [`SANDBOX_R0131`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0131) | Sandbox stateRoot must be a dedicated directory, not the filesystem root. |
| [`SANDBOX_R0132`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0132) | Sandbox stateRoot must be outside the authoritative workspace. |
| [`SANDBOX_R0133`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0133) | Sandbox state is not a directory: \<key\> |
| [`SANDBOX_R0134`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0134) | Sandbox projection manifest is invalid: \<path\> |
| [`SANDBOX_R0135`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0135) | Sandbox projected path escapes writable state: \<path\>/\<path\> |
| [`SANDBOX_R0136`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0136) | Sandbox projected path escapes writable state: \<path\>/\<path\> |
| [`SANDBOX_R0137`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0137) | Sandbox commands cannot override \<reservedName\>. |
| [`SANDBOX_R0138`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0138) | Sandbox \<label\> directory does not exist: \<path\> |
| [`SANDBOX_R0139`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0139) | Sandbox stateRoot changed while the Sandbox was materializing. |
| [`SANDBOX_R0140`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0140) | Trusted host Sandbox path escapes the session root: \<path\> |
| [`SANDBOX_R0141`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0141) | Sandbox command aborted. |
| [`SANDBOX_R0142`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0142) | The vercel Sandbox runtime requires @vercel/sandbox: \<value\> |
| [`SANDBOX_R0143`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0143) | Vercel Sandbox port \<port\> was not declared in runtime.ports. |
| [`SANDBOX_R0144`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0144) | See the page of the code. |
| [`SANDBOX_R0145`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0145) | See the page of the code. |
| [`SANDBOX_R0146`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0146) | \<label\> must be "project" or an object with node, packageManager, or fallbackNode. |
| [`SANDBOX_R0147`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0147) | Sandbox toolchain could not find a Node.js version. Add package.json devEngines.runtime, .node-version, .nvmrc, volta.node, or engines.node to the project, or set toolchain.fallbackNode. |
| [`SANDBOX_R0148`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0148) | package.json packageManager must be a name@version string. |
| [`SANDBOX_R0149`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0149) | \<source\> selects bun, which the Sandbox toolchain does not provision yet. Install bun in the Sandbox image or set toolchain.packageManager to false. |
| [`SANDBOX_R0150`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0150) | Sandbox toolchain provisioning requires a Linux or macOS host. |
| [`SANDBOX_R0151`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0151) | Sandbox toolchain cannot parse Node.js version \<spec\>. |
| [`SANDBOX_R0152`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0152) | \<name\>@\<version\> registry metadata has no sha512 integrity. |
| [`SANDBOX_R0153`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0153) | Node.js archive checksum mismatch for \<url\>: expected sha256 \<expected\>, received \<actual\>. |
| [`SANDBOX_R0154`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0154) | Sandbox toolchain cache must be a directory owned by the current user and not writable by others: \<cacheRoot\> |
| [`SANDBOX_R0155`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0155) | Sandbox toolchain could not download Node.js release index from \<url\>: the file is not a list. |
| [`SANDBOX_R0156`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0156) | Sandbox runtime \<name\> does not provision toolchains. Use a built-in runtime or remove sandbox.toolchain. |
| [`SANDBOX_R0159`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0159) | Cloudflare \<name\> exceeded the \<bufferLimit\>-byte output buffer limit. Consume both streams concurrently or cancel unused output. |
| [`SANDBOX_R0160`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0160) | \<message\> |
| [`SANDBOX_R0161`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0161) | Container Sandbox could not prepare \<sandboxRoot\>. Run the image as root, or set user to a user that root can chown to: \<value\> |
| [`SANDBOX_R0162`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0162) | Container Sandbox cleanup failed: \<value\> |
| [`SANDBOX_R0163`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0163) | Container Sandbox could not write \<path\>: \<value\> |
| [`SANDBOX_R0164`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0164) | Invalid signal: \<signal\> |
| [`SANDBOX_R0165`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_r0165) | \<runtime\> Sandbox cannot send the signal \<signal\>. |
| [`SANDBOX_TASK_R0001`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0001) | Sandbox Task Definition \<file\> declares project: true but no project was resolved. |
| [`SANDBOX_TASK_R0002`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0002) | Sandbox Task Definition \<file\> declares project: false but has a runtime dependency that could not be bundled. |
| [`SANDBOX_TASK_R0003`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0003) | The Cloudflare Sandbox provider requires @cloudflare/sandbox. Install a supported version before building. |
| [`SANDBOX_TASK_R0004`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0004) | Could not resolve the installed @cloudflare/sandbox version. |
| [`SANDBOX_TASK_R0006`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0006) | Cloudflare Sandbox cannot compose legacy migrations with an existing Wrangler exports configuration. Remove exports or configure the Sandbox Durable Object explicitly. |
| [`SANDBOX_TASK_R0007`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0007) | Cloudflare migration tag \<migrationTag\> is already in use. Configure a unique sandbox migrationTag. |
| [`SANDBOX_TASK_R0008`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0008) | Cloudflare Durable Object binding \<binding\> is already in use. Configure a unique sandbox binding. |
| [`SANDBOX_TASK_R0009`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0009) | Sandbox package "\<packageRoot\>" has multiple entrypoints: \<value\>. |
| [`SANDBOX_TASK_R0010`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0010) | Sandbox package "\<packageRoot\>" requires one ESM entrypoint: \<value\>. |
| [`SANDBOX_TASK_R0011`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0011) | Sandbox Task Definition "\<name\>" options must be JSON-serializable. |
| [`SANDBOX_TASK_R0012`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0012) | See the page of the code. |
| [`SANDBOX_TASK_R0013`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0013) | Sandbox Task Definitions "\<existing\>" and "\<name\>" generate the same artifact path "\<definitionFilename\>". |
| [`SANDBOX_TASK_R0015`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0015) | Sandbox package project is missing required file: \<path\> |
| [`SANDBOX_TASK_R0016`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0016) | Sandbox package manifest is invalid JSON: \<path\> |
| [`SANDBOX_TASK_R0017`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0017) | Sandbox package manifest "\<path\>" must set "type" to "module". Canonical Sandbox package entrypoints are ESM. |
| [`SANDBOX_TASK_R0018`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0018) | Sandbox workspace dependency "\<packageName\>" exposes TypeScript runtime target "\<aliasTarget\>" through package import "\<specifier\>". Build dependencies to JavaScript before Sandbox execution. |
| [`SANDBOX_TASK_R0019`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0019) | Sandbox workspace dependency "\<packageName\>" exposes TypeScript runtime target "\<specifier\>" from "\<path\>". Build dependencies to JavaScript before Sandbox execution. |
| [`SANDBOX_TASK_R0020`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0020) | Sandbox workspace dependency "\<packageName\>" exposes TypeScript runtime target "\<target\>" in "\<path\>". Build dependencies to JavaScript before Sandbox execution. |
| [`SANDBOX_TASK_R0021`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0021) | Sandbox package module "\<path\>" could not be transpiled: \<details\> |
| [`SANDBOX_TASK_R0022`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0022) | Sandbox package module "\<path\>" uses CommonJS \<syntax\>\<target\>. Canonical Sandbox package entrypoints are ESM; use import or export syntax. |
| [`SANDBOX_TASK_R0023`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0023) | Sandbox package module "\<path\>" uses a non-literal dynamic import. Canonical Sandbox package entrypoints require literal import() specifiers. |
| [`SANDBOX_TASK_R0024`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0024) | Sandbox package module "\<path\>" imports package alias "\<specifier\>". Use an explicit relative ESM import for local Sandbox source. |
| [`SANDBOX_TASK_R0025`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0025) | Sandbox package module "\<path\>" self-imports "\<specifier\>". Use an explicit relative ESM import for local Sandbox source. |
| [`SANDBOX_TASK_R0026`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0026) | Sandbox package module "\<path\>" imports absolute or URL module "\<specifier\>". Use a relative module inside the package or a runtime-ready package dependency. |
| [`SANDBOX_TASK_R0027`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0027) | Sandbox package module "\<path\>" imports "\<specifier\>" outside its package. Declare runtime-ready JavaScript as a package dependency instead. |
| [`SANDBOX_TASK_R0028`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0028) | Sandbox package module "\<path\>" imports "\<specifier\>", which is not an executable package file. Use an explicit extension that resolves to a package file. |
| [`SANDBOX_TASK_R0029`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0029) | Sandbox package module "\<path\>" imports CommonJS module "\<specifier\>". Canonical Sandbox package source must use ESM JavaScript or TypeScript modules. |
| [`SANDBOX_TASK_R0030`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0030) | Sandbox package module "\<path\>" imports JSX module "\<specifier\>". Canonical Sandbox package source does not compile JSX. |
| [`SANDBOX_TASK_R0031`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0031) | Sandbox package module "\<path\>" imports declaration file "\<specifier\>" at runtime. Use an import type declaration instead. |
| [`SANDBOX_TASK_R0032`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0032) | Sandbox package module "\<path\>" conflicts with generated executable "\<executablePath\>". Rename the existing file. |
| [`SANDBOX_TASK_R0033`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0033) | Timed out waiting to prepare the Sandbox runtime in \<generatedDir\>. |
| [`SANDBOX_TASK_R0034`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0034) | Lost ownership while preparing the Sandbox runtime in \<generatedDir\>. |
| [`SANDBOX_TASK_R0035`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0035) | Lost ownership while preparing the Sandbox runtime in \<generatedDir\>. |
| [`SANDBOX_TASK_R0036`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0036) | Lost ownership while preparing the Sandbox runtime in \<generatedDir\>. |
| [`SANDBOX_TASK_R0037`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0037) | Lost ownership while preparing the Sandbox runtime in \<generatedDir\>. |
| [`SANDBOX_TASK_R0038`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0038) | Lost ownership while preparing the Sandbox runtime in \<generatedDir\>. |
| [`SANDBOX_TASK_R0039`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0039) | Lost ownership while preparing the Sandbox runtime in \<generatedDir\>. |
| [`SANDBOX_TASK_R0041`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0041) | Sandbox runtime changed during activation; the previous runtime is retained at \<previousRuntime\>. |
| [`SANDBOX_TASK_R0042`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0042) | `sandboxTask` must be a plain object. |
| [`SANDBOX_TASK_R0045`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0045) | Conflicting Cloudflare \<conflictLabel\> "\<key\>". |
| [`SANDBOX_TASK_R0046`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0046) | Missing Cloudflare durable object migration entries for: \<value\>. |
| [`SANDBOX_TASK_R0052`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0052) | Sandbox name is required. An explicit name is required. |
| [`SANDBOX_TASK_R0053`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0053) | See the page of the code. |
| [`SANDBOX_TASK_R0054`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0054) | Sandbox "\<name\>" is invalid. |
| [`SANDBOX_TASK_R0055`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0055) | Sandbox project file escapes its scan root: \<path\> |
| [`SANDBOX_TASK_R0056`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0056) | Sandbox package manifest is invalid JSON: \<path\> |
| [`SANDBOX_TASK_R0057`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0057) | Sandbox package manifest "vitehub" must be an object: \<path\> |
| [`SANDBOX_TASK_R0058`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0058) | Sandbox package manifest "vitehub.sandboxTask" must be an object: \<path\> |
| [`SANDBOX_TASK_R0059`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0059) | Sandbox package manifest "vitehub.sandboxTask" has unsupported keys: \<value\>. |
| [`SANDBOX_TASK_R0060`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0060) | Sandbox package manifest "vitehub.sandboxTask.timeout" must be a positive integer no greater than \<maxTimeout\>. |
| [`SANDBOX_TASK_R0061`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0061) | Sandbox package references missing pnpm workspace dependency "\<name\>". |
| [`SANDBOX_TASK_R0062`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0062) | Sandbox Task Definition is outside its scan root: \<definitionFile\> |
| [`SANDBOX_TASK_R0063`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0063) | Sandbox Task Definition "\<definitionFile\>" requires a package.json between its directory and "\<root\>". |
| [`SANDBOX_TASK_R0064`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0064) | Sandbox pnpm patch must stay inside its install root: \<patchPath\> |
| [`SANDBOX_TASK_R0065`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0065) | Sandbox pnpm patch must stay inside its install root: \<patchPath\> |
| [`SANDBOX_TASK_R0066`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0066) | Sandbox file does not exist: \<path\> |
| [`SANDBOX_TASK_R0067`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0067) | Sandbox bundle path must stay inside the project: \<path\>. |
| [`SANDBOX_TASK_R0068`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0068) | Unsupported sandbox provider: \<provider\> |
| [`SANDBOX_TASK_R0069`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0069) | Sandbox Task Definition options only support timeout and env. Unsupported: \<value\> |
| [`SANDBOX_TASK_R0070`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0070) | Sandbox Task Definition timeout must be a positive integer no greater than \<maxTimeout\>. |
| [`SANDBOX_TASK_R0071`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0071) | See the page of the code. |
| [`SANDBOX_TASK_R0072`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0072) | `<functionName>()` requires an options object. |
| [`SANDBOX_TASK_R0073`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0073) | `<functionName>()` project must be a boolean. |
| [`SANDBOX_TASK_R0074`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0074) | Sandbox Task Definition "\<name\>" is no longer generated. |
| [`SANDBOX_TASK_R0075`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0075) | Sandbox Task Definition "\<name\>" is no longer generated. |
| [`SANDBOX_TASK_R0076`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_r0076) | Unsupported sandbox provider for this hosted build: \<provider\> |

## Configuration errors

| Code | What happened |
| --- | --- |
| [`SANDBOX_TASK_C0001`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0001) | \<sandboxTaskDefinitionSyntax\> options arrays must use static values. |
| [`SANDBOX_TASK_C0002`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0002) | \<sandboxTaskDefinitionSyntax\> options must use plain object literals. |
| [`SANDBOX_TASK_C0003`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0003) | \<sandboxTaskDefinitionSyntax\> options only support identifier or string-literal keys. |
| [`SANDBOX_TASK_C0004`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0004) | \<sandboxTaskDefinitionSyntax\> options must use static JSON-serializable values. |
| [`SANDBOX_TASK_C0005`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0005) | \<sandboxTaskDefinitionSyntax\> requires one direct object literal. |
| [`SANDBOX_TASK_C0006`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0006) | \<sandboxTaskDefinitionSyntax\> requires explicit object properties. |
| [`SANDBOX_TASK_C0007`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0007) | \<sandboxTaskDefinitionSyntax\> options must use static values. |
| [`SANDBOX_TASK_C0008`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0008) | \<sandboxTaskDefinitionSyntax\> project must be a boolean. |
| [`SANDBOX_TASK_C0009`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0009) | \<sandboxTaskDefinitionSyntax\> requires a `handler`. |
| [`SANDBOX_TASK_C0010`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0010) | `<functionName>()` requires a \<label\> as the first argument. |
| [`SANDBOX_TASK_C0011`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0011) | `<functionName>()` accepts one options object. |
| [`SANDBOX_TASK_C0012`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0012) | `<functionName>()` \<invalidKeysMessage\>. Unsupported keys: \<value\>. |
| [`SANDBOX_TASK_C0013`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0013) | Sandbox Tasks read their definitions with TypeScript. Install `typescript` in the app. |
| [`SANDBOX_TASK_C0014`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_c0014) | \<file\>:\<value\>: `defineSandboxTask({ run })` was renamed. Pass the Sandbox handler as `handler`: `defineSandboxTask({ handler })`. |

## Named errors

| Code | What happened |
| --- | --- |
| [`SANDBOX_CLOUDFLARE_COMMAND_TIMED_OUT`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_cloudflare_command_timed_out) | Command timed out after \<timeout\>ms. |
| [`SANDBOX_CLOUDFLARE_CONTAINER_MISSING`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_cloudflare_container_missing) | The Sandbox Durable Object has no Container. Add a containers entry for its class in wrangler.json. |
| [`SANDBOX_CLOUDFLARE_LOG_STREAM_FAILED`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_cloudflare_log_stream_failed) | Cloudflare process log stream failed: \<detail\> |
| [`SANDBOX_CLOUDFLARE_PROCESS_NOT_FOUND`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_cloudflare_process_not_found) | Process \<processId\> is not running in this Sandbox. |
| [`SANDBOX_CLOUDFLARE_SLEEP_AFTER_INVALID`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_cloudflare_sleep_after_invalid) | Invalid Cloudflare sleepAfter \<value\>. Use seconds or a value such as "30s", "5m" or "1h". |
| [`SANDBOX_NETWORK_POLICY_INVALID`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_network_policy_invalid) | Invalid Sandbox networkPolicy. \<problem\> |
| [`SANDBOX_SSH_DRAIN_TIMEOUT_INVALID`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_ssh_drain_timeout_invalid) | drainTimeoutMs must be a non-negative integer of milliseconds. |
| [`SANDBOX_SSH_LAUNCH_INVALID`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_ssh_launch_invalid) | SSH connectRetryMs must be a non-negative integer of milliseconds. |
| [`SANDBOX_SSH_POSIX_REQUIRED`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_ssh_posix_required) | SSH command supervision requires a POSIX host. |
| [`SANDBOX_TASK_CLOUDFLARE_INSTANCE_TYPE_TOO_SMALL`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_cloudflare_instance_type_too_small) | The Cloudflare containers entry of class \<className\> sets the instance type \<instanceType\>, which is smaller than the Sandbox Task size (\<size\>). |
| [`SANDBOX_TASK_CLOUDFLARE_MAX_INSTANCES_CONFLICT`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_cloudflare_max_instances_conflict) | The Cloudflare containers entry of class \<className\> sets max_instances \<configured\>, but the Sandbox Task option maxInstances is \<requested\>. |
| [`SANDBOX_TASK_RENAMED_PROVIDER_KEY`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_renamed_provider_key) | `sandboxTask.provider` is \<value\>. ViteHub renamed this key to `driver`, and it does not read `provider`, so the Sandbox Task would not use the driver you chose. |
| [`SANDBOX_TASK_SIZE_INVALID`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_size_invalid) | Sandbox Task option \<key\> must be a positive number\<value\>. Received \<value\>. |
| [`SANDBOX_TASK_SIZE_TOO_LARGE`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_size_too_large) | \<provider\> has no Sandbox size for \<size\>. The largest size is \<max\>. |
| [`SANDBOX_TASK_VERCEL_TIMEOUT_LIMIT`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_task_vercel_timeout_limit) | Vercel rejected the Sandbox session timeout of \<timeout\>ms: \<limit\>. |
| [`SANDBOX_TRUSTED_HOST_CLOSING`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_trusted_host_closing) | Trusted host Sandbox session is closing. |
| [`SANDBOX_TRUSTED_HOST_KILL_TIMED_OUT`](https://vitehub.dev/docs/sandbox/diagnostics/sandbox_trusted_host_kill_timed_out) | Timed out waiting for trusted-host processes to exit after SIGKILL. |

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/sandbox.md)
- [Get started](https://vitehub.dev/raw/docs/sandbox/get-started.md)
- [Configure](https://vitehub.dev/raw/docs/sandbox/configure.md)
- [Server API](https://vitehub.dev/raw/docs/sandbox/server-api.md)
- [Agent capability](https://vitehub.dev/raw/docs/sandbox/agent-capability.md)
- [Hosts](https://vitehub.dev/raw/docs/sandbox/hosts.md)
- [Limits and errors](https://vitehub.dev/raw/docs/sandbox/limits-and-errors.md)
- [Concepts](https://vitehub.dev/raw/docs/sandbox/concepts.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
