Sandbox Troubleshooting
Most sandbox errors come from one of three mismatches:
- The sandbox file doesn't match what eve expects.
- The build output doesn't match the runtime.
- A session's recorded sandbox doesn't match the current agent.
Headings in code format start with the error text, so search this page for the message you see.
Errors in the sandbox file
must export an environment
eve needs a named environment export so eve build and eve dev can prepare it before any session exists. Export the environment that the selector opens:
opened an environment other than the one it exports
The selector called open() on an environment object other than the exported environment. For example, it created one inline with DefaultSandbox.environment().open() or imported one from another sandbox file. Create the environment once at the top level of the module, export it, and call environment.open() on that export.
can open only one sandbox
The selector called environment.open() more than once. Call it once and return that sandbox.
can only open sandboxes inside defineSandbox()
Code outside the defineSandbox() selector, such as a tool or a module's top level, called environment.open(). From tools and other runtime code, use ctx.getSandbox(), or ctx.getSandbox(environment) to also get the provider-specific methods.
selects parent.sandbox but agent node ... has no parent
The sandbox file uses defineParentSandbox(), but the agent isn't a declared subagent. Only a declared subagent can share its parent's sandbox. Give this agent its own sandbox file with defineSandbox() and an exported environment.
Errors after a build or deploy
Production never prepares sandbox environments. eve build records one artifact for each agent sandbox, such as a Docker image, a Vercel snapshot, or a just-bash template. The runtime uses only those.
No prepared ... sandbox environment is recorded
The deployed build output has no prepared artifact for this agent. Usually the output came from eve build --skip-sandbox-prewarm, which the CLI reference marks as not deployable. Run eve build without that flag and deploy its output.
The prepared sandbox artifact ... was created with provider
The sandbox file selected different providers at build time and at runtime, because it checks the host and the hosts differ. For example, it uses process.env.VERCEL ? VercelSandbox.environment() : DockerSandbox.environment(). Select one provider explicitly, or use DefaultSandbox.environment(), which records its choice at build time. Then rebuild with eve build, or restart eve dev locally.
DefaultSandbox has no sandbox provider for this build
The production eve build ran outside Vercel without a reachable Docker daemon, so DefaultSandbox recorded no provider. A RUN eve build step in a Dockerfile usually has no Docker daemon, even when the running container later mounts /var/run/docker.sock. Start Docker and run eve build again, deploy to Vercel, or select a provider explicitly, for example DockerSandbox.environment() from eve/sandbox/docker. See How eve selects the provider.
Sandbox template ... is not available to this runtime
The build recorded an artifact, but the provider can't find its template. When the provider knows the cause, the message includes it:
| Provider | Common cause |
|---|---|
| Docker | The Docker daemon has no image with that name: it was removed, for example by docker image prune -a, or the build used another Docker daemon. |
| Vercel | The Vercel Sandbox snapshot expired or was deleted. |
| just-bash | The template directory under .eve/sandbox-cache/ was deleted, or the build ran on another machine. |
| Custom | The image, snapshot, or template that the artifact names no longer exists, so the provider threw SandboxTemplateNotProvisionedError. |
The runtime never recreates a template. Run eve build again and deploy its output.
Invalid prepared ... artifact
The recorded artifact doesn't match the format this eve version expects. Usually the build used a different eve version than the runtime. Rebuild with the runtime's eve version, then redeploy.
Errors when a session resumes
A session records which provider created its sandbox, and later turns resume it without running the selector.
This session's sandbox was created by provider
eve logs this warning when a session continues on a build whose provider didn't create its sandbox. This happens after you change providers, or when DefaultSandbox selects differently in a new build. The session continues in a fresh sandbox from the current provider, without the old sandbox's files. eve doesn't delete the old sandbox; remove it with the old provider's tooling, such as docker rm. To keep the session's files, restore the previous provider before the session resumes.
DefaultSandbox selected just-bash, which always allows network access
The sandbox set a network policy other than "allow-all" through open() or setNetworkPolicy(). DefaultSandbox had selected just-bash, because Docker wasn't reachable during eve dev or eve eval. Start Docker and restart eve dev so DefaultSandbox selects Docker, or select VercelSandbox.environment() or DockerSandbox.environment() explicitly.
Invalid ... session state
The session's saved sandbox state doesn't match the format this eve version expects. Usually the session started under a different eve version. Start a new session to get a fresh sandbox.
Errors during eve dev
During eve dev, the first sandbox access prepares every sandbox environment in the current build. See Prepare a reusable environment.
Timed out after 10 minutes waiting for another request or eve dev worker
Another request or eve dev worker is still preparing environments. Find the slow step, such as an image pull, a Dockerfile build, or a prepare callback, in the eve dev output or eve logs. Retry after preparation finishes, or restart eve dev to cancel it.
Custom provider errors
These errors come from a provider defined with defineSandboxProvider(), or from a keyed tool call on a provider that cannot keep its sandbox. See Custom sandbox providers.
cannot keep a sandbox between invokeTool calls
A keyed invokeTool call, such as an MCP tool session, requested the sandbox from a provider that doesn't keep sandboxes between calls. Docker is one such provider. Call the tool without a key, or use Vercel Sandbox or just-bash. On a custom provider, set toolSessions: true and limit how long the provider keeps those sandboxes. See Keep sandboxes for keyed tool calls.
Sandbox connection extensions cannot replace the session members eve provides
The connection's extensions define a member eve already provides, such as run, readFile, stop, or delete. Rename the extension member.
ctx.templateKey() reserves
The identity passed to ctx.templateKey() sets resources or sourceRevision. eve adds both to every template key itself. Rename that field.
returned non-serializable session state
start() returned state that is not JSON-compatible, such as a class instance, a function, or undefined. Return only strings, numbers, booleans, null, arrays, and plain objects, and keep live clients in the connection instead.
Provider setup errors
Docker is not installed or not running
Install and start Docker Desktop, OrbStack, Colima, or another runtime with a Docker-compatible docker CLI. To use another compatible CLI, such as Podman, set EVE_DOCKER_PATH to its path. If you do not need Docker specifically, use DefaultSandbox.environment(), which falls back to just-bash during eve dev and eve eval.
The just-bash package is missing
eve dev installs just-bash automatically unless the environment sets autoInstall: false. For other commands, add it to your application, for example with pnpm add -D just-bash, which matches what eve dev installs. See just-bash Sandbox.
Cannot build deployable Vercel output because this app's sandbox templates need preparation
A build with VERCEL set needs VERCEL_OIDC_TOKEN for templates with a prepare callback, managed workspace or skill files, or a source. Empty Vercel templates without these inputs build without the token. Don't deploy the .vercel/output from a build that failed this way. For a local vercel build, run vercel link and vercel pull, then retry. Builds on Vercel set VERCEL_OIDC_TOKEN automatically; see Vercel OIDC federation.
Vercel Sandbox authentication fails
With missing or expired credentials, the Vercel Sandbox SDK reports an authentication or OIDC token error during eve build or at runtime. Locally, run eve link to link a project and pull VERCEL_OIDC_TOKEN into .env.local. Outside Vercel without a linked project, set VERCEL_TOKEN, VERCEL_TEAM_ID, and VERCEL_PROJECT_ID. See Vercel Sandbox authentication for the full resolution order.