{
  "data": null,
  "kind": "anchor.page",
  "links": {
    "api": "https://www.anchorterminal.com/api/v1/index.json",
    "html": "https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/",
    "json": "https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/index.json",
    "llms": "https://www.anchorterminal.com/llms.txt",
    "markdown": "https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/index.md",
    "mcp": "https://www.anchorterminal.com/mcp",
    "slim": "https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/index.min.md"
  },
  "markdown": "Four or more companies' docs show a full fit.\n\n| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |\n| --- | --- | --- | --- | --- |\n| 5 | 17 | 24 | 11 | 6 |\n\n## What counts as done\n\nstdout, 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.\n\nMeasured, for our own tests: the call returns within 30 seconds including sandbox start, and the timeout is enforced within 10 percent of its value.\n\nHow 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\n\n## Does the job\n\nThe docs show it meets the test above, and nothing we read says otherwise.\n\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n\n## Does the job, with a limit\n\nIt 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.\n\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **Offscreen (Mark Phelps (individual))**: `offscreen run myapp -- \u003ccmd\u003e` 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).\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n\n## What stops agents finishing\n\n- default lifetime of 5 minutes kills the sandbox mid-run when the caller forgets to set a timeout\n- a card is required before the first call (Modal, Sandbox0, InstaVM, Maritime)\n- no per-call route for a one-off run on hosted SDK-only products\n\n## Around it\n\nBefore: inference.generate-code, web-scrapers.page-to-markdown. After: agent-memory.store-result, personal-assistants.reply-in-chat.\n\n## Where this comes from\n\nWeight 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.\n\nAs 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.\n",
  "meta": {
    "attribution": "Anchor Terminal (https://www.anchorterminal.com)",
    "attributionRequired": true,
    "credit": "CC BY 4.0, credit Anchor Terminal and link the page or API address you took it from (https://www.anchorterminal.com/terms/#data)",
    "docs": "https://www.anchorterminal.com/docs/",
    "generatedAt": "2026-11-16",
    "license": "CC-BY-4.0",
    "method": "https://www.anchorterminal.com/benchmark/",
    "methodology": "0.8",
    "openapi": "https://www.anchorterminal.com/openapi.json",
    "preview": false,
    "run": "2026-10-01",
    "runLabel": "October 2026 research run",
    "terms": "https://www.anchorterminal.com/terms/#data"
  },
  "page": {
    "breadcrumbs": [
      {
        "name": "Home",
        "url": "https://www.anchorterminal.com/"
      },
      {
        "name": "For agents",
        "url": "https://www.anchorterminal.com/agents/"
      },
      {
        "name": "Niches",
        "url": "https://www.anchorterminal.com/niches/"
      },
      {
        "name": "Run a snippet the model just wrote and return its output",
        "url": ""
      }
    ],
    "description": "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.",
    "facts": null,
    "h1": "Run a snippet the model just wrote and return its output",
    "image": "https://www.anchorterminal.com/assets/og/default.png",
    "path": "/niches/code-sandboxes.run-generated-code/",
    "published": "",
    "section": "agents",
    "title": "Run a snippet the model just wrote and return its output | Anchor…",
    "toc": null,
    "updated": "2026-11-15",
    "url": "https://www.anchorterminal.com/niches/code-sandboxes.run-generated-code/"
  },
  "tokens": {
    "markdown": 2050,
    "slim": 430
  },
  "version": 1
}
