Skip to main content
Every sandbox runs on one route: a provider plus the account that pays for it, either your own provider key or Credits. BoxRouter skips any route that can’t do what you asked, puts the rest in order, and tries them one at a time until one creates the sandbox. Sandboxes on different providers share one Volume.
Files on a Local Disk: your code runs a sandbox on Provider A, and its files sit on Provider A's local disk. Files in a Volume: your code calls BoxRouter, which runs the sandbox on Provider A or Provider B, and both mount the same Volume.Files on a Local Disk: your code runs a sandbox on Provider A, and its files sit on Provider A's local disk. Files in a Volume: your code calls BoxRouter, which runs the sandbox on Provider A or Provider B, and both mount the same Volume.Files on a Local Disk: your code runs a sandbox on Provider A, and its files sit on Provider A's local disk. Files in a Volume: your code calls BoxRouter, which runs the sandbox on Provider A or Provider B, and both mount the same Volume.Files on a Local Disk: your code runs a sandbox on Provider A, and its files sit on Provider A's local disk. Files in a Volume: your code calls BoxRouter, which runs the sandbox on Provider A or Provider B, and both mount the same Volume.

A local disk ends with its sandbox; a Volume outlives it.

This page covers:
Illustrative routes are checked against the whole request. Ineligible routes are excluded; preferences order eligible routes before creation. No eligible route means nothing is created.Illustrative routes are checked against the whole request. Ineligible routes are excluded; preferences order eligible routes before creation. No eligible route means nothing is created.Illustrative routes are checked against the whole request. Ineligible routes are excluded; preferences order eligible routes before creation. No eligible route means nothing is created.Illustrative routes are checked against the whole request. Ineligible routes are excluded; preferences order eligible routes before creation. No eligible route means nothing is created.

Requirements filter routes; preferences order those that remain. The routes shown are examples.

Requirements Filter Routes

A route stays only if it meets everything in your create request: Workspace restrictions apply too: excluded providers, privacy settings, spend limits and which provider accounts are connected. BoxRouter never loosens a requirement to make a route fit. A cheaper or faster route that misses one is out: a sandbox that silently lacks a capability fails later, inside your workload.

When No Route Is Left

The create request fails with 409 no_eligible_route before any provider is called, so nothing needs cleanup. The error lists each excluded route and the change that would make it eligible. Match runs the same filter and creates nothing. The examples on this page use a client from the quickstart, and the CLI examples also use jq. Output is trimmed to the fields discussed. Your provider’s ID replaces <PROVIDER_ID>, and its sizes can differ:
Creating a sandbox with the same request fails with these lists under details. Its fix comes from the nearest change: Set resources.cpu_min to 8; then <PROVIDER_ID> fits. A workspace with no provider key and no Credits gets the same error, as does a request that names a provider you have not connected.

Preferences Rank What Is Left

BoxRouter tries the routes that fit in three groups, by who pays: your Prioritized keys, then Credits, then your Fallback keys. Within a group, the workspace’s routing mode ranks the providers. Custom is the exception: it follows your own provider order, then each provider’s funding order. Routing settings covers the modes and how a key lands in a group. A request’s preferences adjust that ranking: A request can narrow what the workspace allows but never widen it:
  • A request can never bring back a provider the workspace excludes.
  • If the workspace sets allow_fallbacks to false, a request cannot turn it back on.
  • With Prevent Overrides on, a request containing order, sort or allow_fallbacks is refused with 400 routing_overrides_forbidden, even if the value matches the workspace’s.
sort takes one of two values: sort: "price" compares the hourly list price of the size each route would grant. With no size there is nothing to compare, so name resources when price matters. It does not compare what your provider invoices you. match shows where each eligible route ranks: its position, a reason such as lowest_price or explicit_order, and the price compared. With one eligible route there is nothing to compare:
route.selection.ranked_by records the ordering rule.

Fallback When Creating a Sandbox Fails

If creating a sandbox on a route fails without producing one, BoxRouter tries the next route in the ranking. The next route can be another account of the same provider. BoxRouter also moves on after an unclear failure, such as a timeout. The provider may finish creating the abandoned sandbox later, and it may incur charges until it is destroyed. BoxRouter looks for it by operation label and requests cleanup, but cleanup can be delayed or unconfirmed. If you need help tracing an attempt, contact support with the diagnostic identifiers. The next route always comes from the same group as the first, so the same party pays. A request that started on one of your Prioritized keys never moves to Credits or a Fallback key. BoxRouter stops trying when:
  • the request pins one route or account with route.id or route.account_id,
  • allow_fallbacks is false,
  • an attempt limit is reached, or
  • no eligible route is left in the group.
If every attempt fails, the error is the last attempt’s, and the earlier ones are in details.attempts.

Read the Route Result

A sandbox stays on the route it was created on, and route.selection records the decision. It holds two lists:
  • attempts are the routes where creating the sandbox failed before the one that worked.
  • preparation_skips are the routes BoxRouter skipped before calling any provider. Each also has a reason_code.
An entry in either list names route_id, account_id (null for Credits) and a cause: Treat a cause you do not recognize as a failed attempt, because new ones can be added.

Next Steps

Set Workspace Routing

Set the workspace mode and funding order.

Capabilities and Isolation

See what you must request and which routes fit.

Recover from Errors

Read a no_eligible_route refusal.