Dev.to AI 🤖 Ai 👁 0 📖 4 min read

Where should a coding agent run the code it just wrote?

Coding agents don't just write code now. They run it, often before a person has read it. The question I keep coming back to is simple: where does that code run, and what can it touch? I'm Vakeesh, a founding member of

Coding agents don't just write code now. They run it, often before a person has read it.

The question I keep coming back to is simple: where does that code run, and what can it touch?

I'm Vakeesh, a founding member of Sandscale, so this is not a neutral review. I'll describe the problem, show the official commands for starting a Firecracker microVM sandbox, and be plain about the limits.

Treat generated code as untrusted input

If an agent can run a command, that command can reach whatever the environment can reach: files, credentials, the network. A laptop, or a container that shares a kernel with other work, makes that radius large.

A reasonable default is to treat agent-generated code the way you'd treat any other untrusted input, and give each run a hard boundary.

Approach Isolation Trade-off
Run it on your laptop None It can see local files and credentials
A shared container Shared kernel You accept container-escape risk
A microVM per run Its own kernel You need a way to start and manage that box

Try it with the CLI

The sandscale CLI runs on macOS and Linux. Windows is coming soon. It installs per user, in ~/.sandscale/bin, with no admin rights, and checks the download against release checksums first.

Install, from the Quickstart and CLI reference:

curl -fsSL https://sandscale.dev/install | sh
# or with Homebrew
brew install sandscale/tap/sandscale

Sign in, then start a sandbox and run a command. These lines are from the sandbox CLI reference, which is generated from the CLI itself. Template names depend on what your organization has set up, so run --options first. python-3.12 and sbx_9 are the examples in the docs; replace the ID with the one you get back.

sandscale login
sandscale sandbox start --options
sandscale sandbox start --template python-3.12 --ttl 1h --network none
sandscale sandbox exec sbx_9 -- python -V

--network none is an example from that page. Network access follows your plan and your organization's policy, and a sandbox can reach only what your egress allowlist allows. The docs do not say the network is off by default.

To send a folder, run a command, stream the output and (without --keep) stop the sandbox afterwards:

sandscale sandbox run --sync . -- make test

When you're done with a box you started:

sandscale sandbox stop sbx_9

You can also pause and resume a sandbox, which keeps its memory and files. That works on every plan, in the console or through the API / TypeScript SDK. I did not find pause or resume commands in the CLI reference. Paused and idle time between tool calls is free; only awake vCPU-hours count.

Or start one from the TypeScript SDK

This is the Quickstart example, copied as published. The TypeScript SDK needs Node.js 22 or later. Create a personal API key in the console (it starts with nia_ and is shown once; every key expires within 90 days), then:

export SANDSCALE_API_KEY=nia_...
npm install @sandscale/sdk

Save this as hello.mjs and run node hello.mjs:

import { Sandscale } from '@sandscale/sdk';

const sandscale = new Sandscale(); // reads SANDSCALE_API_KEY

const box = await sandscale.sandboxes.create({ timeoutSeconds: 600 });
try {
  const run = await sandscale.sandboxes.run(box.id, 'echo hello from a sandbox', {
    region: box.region,
    onStdout: (text) => process.stdout.write(text),
  });
  console.log('exit code', run.exitCode);
} finally {
  await sandscale.sandboxes.stop(box.id, { region: box.region });
}

The Python SDK is coming soon.

Connect a coding agent over MCP

Sandscale's MCP server is at https://mcp.sandscale.dev/mcp.

For Cursor, in ~/.cursor/mcp.json (Quickstart):

{ "mcpServers": { "sandscale": { "url": "https://mcp.sandscale.dev/mcp" } } }

For Claude Code, signing in to the remote server is coming soon. Today, connect it through sandscale mcp, the local server that comes with the CLI:

sandscale login
claude mcp add sandscale -- sandscale mcp

Codex, VS Code, Windsurf and others can add a remote MCP server at the same address. Vault values are never offered to a model.

What sits around the box

These are product facts from the site and docs, not extra claims:

  • Secrets live in Vault and are injected at run time, not placed in prompts or logs
  • DLP on prompts and tool calls, on every plan
  • Human approvals, and a kill switch for the organization
  • A hash-chained audit log of every action, which you can read in the console on every plan. Exporting that log is a Team and Enterprise feature

Honest limits

  • Compute is in the United States (N. Virginia) now. Europe is coming soon. There is no Asia region yet. If you need the workload to stay in your own cloud, Enterprise can run in your own AWS account; self-hosted and air-gapped deployments are available on request.
  • Free is $0/month, with 100 awake vCPU-hours, 3 boxes at once, and up to 2 vCPU per box. Pro and up need a payment method.
  • The CLI is macOS and Linux only; Windows is coming soon.
  • We have not published a SOC 2 report.

If you try it, I'd like to hear where you run agent-generated code today and what you'd need to trust a setup like this for real work.

https://sandscale.dev?utm_source=devto

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.