# Run a snippet the model just wrote and return its output

> Run a snippet the model just wrote and return its output: 5 companies fully do it, 17 with a limit, 24 carry the tag. Every listing in Code execution sandboxes with the reason and a source.

- Canonical: https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/
- Markdown: https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/index.md (~2,050 tokens)
- Slim: https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/index.min.md (~430 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/index.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-15

Four or more companies' docs show a full fit.

| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |
| --- | --- | --- | --- | --- |
| 5 | 17 | 24 | 11 | 6 |

## What counts as done

stdout, stderr, exit code and any files or images the code produced are returned to the agent in one call, and a timeout set by the caller is enforced.

Measured, for our own tests: the call returns within 30 seconds including sandbox start, and the timeout is enforced within 10 percent of its value.

How agents ask for it: run this Python and show me the result; make a chart from this JSON; execute the code you just wrote; render this component and check it works

## Does the job

The docs show it meets the test above, and nothing we read says otherwise.

- **Amazon Bedrock AgentCore Code Interpreter (Amazon Web Services, Inc.)**: StartCodeInterpreterSession then InvokeCodeInterpreter returns the result in one call; each session is a dedicated microVM with a caller-set sessionTimeoutSeconds (default 900, maximum 8 hours). New AWS accounts start without a payment method.
- **Daytona (Daytona Platforms Inc.)**: process.code_run and exec take a timeout (default 10 seconds for commands) and return output and exit code; containers start in under 90 ms (claimed), and $200 of credit needs no card.
- **Freestyle (Freestyle Cloud Inc.)**: vm.exec takes timeoutMs (up to five minutes), the firewall block is required so a VM with no rules has no egress, VMs provision in milliseconds (claimed), and the Free plan needs no card. A user runs sandboxed JavaScript through it.
- **Microsoft Execution Containers (Microsoft Corporation)**: The SDK launches a workload with timeoutMs and egress default deny and returns an ExecutionResult; MIT packages install from npm, NuGet and crates.io with no account. Containment differs by backend.
- **Vercel Sandbox (Vercel Inc.)**: runCommand returns output with a timeout option, Hobby includes 5 Active CPU hours a month, and sandboxes start in milliseconds (claimed). One user generates ECharts and TanStack tables from JSON this way.

## Does the job, with a limit

It does the job, but something in the docs or a user's account will get in an agent's way. The limit is named in each row.

- **Agent 37 Cloud (Agent 37 Inc.)**: POST /v1/instances/{id}/exec returns stdout and exit_code, but the call has no caller timeout: it waits 13 or 15 minutes, then fails while the command keeps running. Instances are persistent machines, so a one-off run means create, exec, delete.
- **Blaxel Sandboxes (Blaxel, Inc.)**: process exec returns stdout, stderr and exit code and `timeout` kills the process, but waitForCompletion is capped at 60 seconds, and a sandbox with no ttl is kept on standby indefinitely, billing snapshot storage.
- **Celesto (formerly SmolVM) (Celesto AI, Inc.)**: `celesto ... exec --json` runs a command in a local Firecracker or QEMU microVM and returns exit_code, with a ready computer in about 500 ms (claimed). No per-command timeout parameter was found, and outbound network is open by default.
- **Cloudflare Sandbox SDK (Cloudflare, Inc.)**: exec() returns stdout and exit code and the instance stops shortly after the Durable Object goes inactive, but there is no hosted API: you deploy and secure a Worker on Workers Paid before an agent can call anything.
- **DeltaBox Lite (DeltaBox (delta-box))**: `deltabox run` executes a command in a confined view of the project and preserves its exit status, with changes held for commit or abort. No command timeout was found, and the default network mode allow_audit is open.
- **Deno Sandbox (Deno Land Inc.)**: A sandbox boots in milliseconds, lives for the script by default or a duration such as "5m", and is killed at expiry. Sandboxes need the Pro plan, and Deno Deploy sunsets in April 2027.
- **E2B (FoundryLabs, Inc.)**: commands.run returns stdout, stderr and exit code with a timeout, and the default sandbox lifetime is 5 minutes with kill on timeout. Issue 1881 found run_code(timeout=N) enforced at about 2N seconds; issue 2056 lost state at the timeout.
- **InstaVM (Checksum Labs, Inc.)**: Firecracker VMs with sub-200 ms start (claimed) run code synchronously or asynchronously, but the Free plan's $50 credit needs a card on file before the first call.
- **Maritime (Maritime AI, Inc.)**: POST /api/sandboxes/ephemeral starts a Firecracker sandbox that ends after idleMinutes (default 5) or its time limit, takes an Idempotency-Key and runs E2B SDK code. The 7-day trial needs a card.
- **Modal Sandboxes (Modal Labs, Inc.)**: sb.exec takes a timeout and returns output, but a payment method must be on file, the default lifetime is 5 minutes, and issue 3992 found an exec timeout left child processes orphaned.
- **Morph Cloud (Morph Labs, Inc.)**: Instances start from snapshots with ttl_seconds and ttl_action and exec wakes a paused instance with wake_on_ssh, but the Free plan has 0 MCUs, so a first run needs the $40 Developer plan.
- **Offscreen (Mark Phelps (individual))**: `offscreen run myapp -- <cmd>` runs any command in a fresh Tart macOS VM and exits with the command's status, but only on an Apple silicon Mac with Xcode, and no command timeout exists beyond a queue timeout (exit 75).
- **SPACE (Perplexity AI)**: After an operator deploys it, a create returns 202, the sandbox is polled to running, and a command session streams output with a timeout over SSE. The install needs a Linux x86_64 KVM host with privileged Docker and Kind.
- **Runloop Devboxes (Runloop AI, Inc.)**: exec returns exit_code, stdout and stderr, the default lifetime is 1 hour and $50 of trial credit needs no card, but Runloop is winding down with support ending 13 November 2026.
- **Sandbox0 (Lougao, LLC)**: Claim a sandbox and run commands, but ttl and hard_ttl default to 0 so a forgotten sandbox runs and bills, and the $5 credit needs a saved card.
- **Sprites (Fly.io, Inc.)**: exec runs a command on a persistent Sprite that pauses about 30 seconds after activity stops, but no exec timeout was found, egress is unrestricted by default, and creation is limited to 10 a minute.
- **Together Code Sandbox (Together Computer, Inc.)**: exec returns output, but the SDK works only for organisations Together has enabled, a snapshot must be built before any sandbox, and nothing stops a sandbox without a ttl.

## What stops agents finishing

- default lifetime of 5 minutes kills the sandbox mid-run when the caller forgets to set a timeout
- a card is required before the first call (Modal, Sandbox0, InstaVM, Maritime)
- no per-call route for a one-off run on hosted SDK-only products

## Around it

Before: inference.generate-code, web-scrapers.page-to-markdown. After: agent-memory.store-result, personal-assistants.reply-in-chat.

## Where this comes from

Weight 11 of 100 in Code execution sandboxes: 6 of 53 use-case mentions across 45 accounts (an account that fits two use cases is counted in both). The classic code-interpreter job is what the E2B and AgentCore SDKs document first, but on Hacker News people describe it less often than agent workspaces.

As data: https://www.anchorterminal.com/api/v1/use-cases/code-sandboxes.run-generated-code.json, or the MCP tool get_use_case with id code-sandboxes.run-generated-code. Draft, read 2026-11-12 from public docs and first-hand accounts, not yet reviewed by a person.

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
