<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sandscale</title>
    <description>The latest articles on DEV Community by Sandscale (@sandscale).</description>
    <link>https://dev.to/sandscale</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4256008%2Fcb4bd197-accb-48e2-9b27-0e19ff5c786b.png</url>
      <title>DEV Community: Sandscale</title>
      <link>https://dev.to/sandscale</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sandscale"/>
    <language>en</language>
    <item>
      <title>Keeping secrets out of agent prompts: how Vault and DLP fit together</title>
      <dc:creator>Sandscale</dc:creator>
      <pubDate>Fri, 20 Nov 2026 16:30:24 +0000</pubDate>
      <link>https://dev.to/sandscale/keeping-secrets-out-of-agent-prompts-how-vault-and-dlp-fit-together-1bd8</link>
      <guid>https://dev.to/sandscale/keeping-secrets-out-of-agent-prompts-how-vault-and-dlp-fit-together-1bd8</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://sandscale.dev/blog/secrets-out-of-agent-prompts-vault-dlp" rel="noopener noreferrer"&gt;sandscale.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An agent that deploys code, queries a database or calls an API needs credentials. The usual shortcuts, a &lt;code&gt;.env&lt;/code&gt; file in the repo, a key pasted into the prompt, a token in a shell history, put those credentials in places where they get copied. This post walks through how credentials leak in agent runs, what Sandscale's Vault and DLP each do about it, and which paths remain open.&lt;/p&gt;

&lt;p&gt;Everything about Sandscale below comes from sandscale.dev as of 20 November 2026. Where the docs are silent, we say so.&lt;/p&gt;

&lt;h2&gt;
  
  
  How secrets leak in an agent run
&lt;/h2&gt;

&lt;p&gt;Think of the places a credential can end up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The prompt.&lt;/strong&gt; A person pastes a key to help the agent along, or the agent reads a file that contains one and includes it in the next model call. From there it sits in a provider's logs and your own transcripts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool-call arguments.&lt;/strong&gt; The agent builds a command or an API call that includes the key inline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Files and the repository.&lt;/strong&gt; A &lt;code&gt;.env&lt;/code&gt; file or a config with a token gets committed or copied.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command output.&lt;/strong&gt; A tool prints the environment, or a debug log echoes a header. The output returns to the model as context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logs and traces.&lt;/strong&gt; Your own telemetry records the above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lingering validity.&lt;/strong&gt; The credential still works long after the run that needed it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No single control covers all six. Vault addresses the way a secret is delivered and how long it lasts. DLP addresses what leaves in prompts and tool calls. Neither inspects what the agent's own code does inside the box, and the end of this post is about that gap.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vault: deliver the secret without the model seeing it
&lt;/h2&gt;

&lt;p&gt;Sandscale's &lt;a href="https://sandscale.dev/security/vault" rel="noopener noreferrer"&gt;Vault&lt;/a&gt; works in three steps, as the site describes them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Store.&lt;/strong&gt; You put a secret in Vault once, not in repos, prompts or environment files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inject.&lt;/strong&gt; It reaches the run in memory, never written to disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End.&lt;/strong&gt; It stops working when the run, session or lease ends.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A run references a secret and Vault injects it at run time. Vault comes with every plan, Free included.&lt;/p&gt;

&lt;h3&gt;
  
  
  Giving a sandbox a secret
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://sandscale.dev/docs/guides/vault-secrets" rel="noopener noreferrer"&gt;step-by-step guide&lt;/a&gt; shows the flow. First store the secret in Vault (the guide shows the steps; the value is read without echoing it). Then reference it when you start a sandbox. With the TypeScript SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;sandscale&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sandboxes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'builtin:python'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;vaultEnv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'DB_PASSWORD'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'secret/data/app/db'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'password'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sandbox gets &lt;code&gt;DB_PASSWORD&lt;/code&gt; in its environment. Your code never handles the value. In the docs' words, the path is "the mount, &lt;code&gt;data&lt;/code&gt;, then the secret's path".&lt;/p&gt;

&lt;p&gt;What the docs say happens to the value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sandscale reads it as you, with your Vault permissions. If you may not read it, the start is refused with &lt;code&gt;vault_env_refused&lt;/code&gt; and nothing starts.&lt;/li&gt;
&lt;li&gt;It goes to the sandbox only. It is never in the API's answer, a log, the run's record or the audit log. The audit entry names the variables, not the values.&lt;/li&gt;
&lt;li&gt;A start can name up to 50 values.&lt;/li&gt;
&lt;li&gt;Build host leases can carry secrets too, and they end with the lease.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What an environment variable does and doesn't protect
&lt;/h3&gt;

&lt;p&gt;The secret reaches the sandbox as an environment variable. That keeps it out of your code, the API answer and the logs. It does not hide it from code running inside the sandbox: any process in the box can read its environment, including a command the agent runs. If the agent runs &lt;code&gt;env&lt;/code&gt; or &lt;code&gt;printenv&lt;/code&gt;, or a script prints its configuration, the value appears in that command's output.&lt;/p&gt;

&lt;h3&gt;
  
  
  The agent over MCP
&lt;/h3&gt;

&lt;p&gt;When an agent connects over Sandscale's MCP server, it can list the names of your Vault secrets but cannot read their values. Every call runs as the signed-in person and lands in the audit log with the tool, region, outcome and app, never the arguments. An agent can know that &lt;code&gt;app/db&lt;/code&gt; exists and ask for a sandbox that references it, without ever receiving the password.&lt;/p&gt;

&lt;h2&gt;
  
  
  DLP: scan what leaves
&lt;/h2&gt;

&lt;p&gt;Vault handles the case where you do it right. DLP handles the case where someone does it wrong. Per the &lt;a href="https://sandscale.dev/security/dlp" rel="noopener noreferrer"&gt;DLP page&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scan.&lt;/strong&gt; Each prompt and MCP tool call is checked against built-in patterns and your own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Block.&lt;/strong&gt; A credential or other sensitive value stops the call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Record.&lt;/strong&gt; What was found, and where, goes into the audit log. The value itself does not.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The headline claim on that page is that "a credential pasted into a prompt never reaches the model." It applies on every plan.&lt;/p&gt;

&lt;p&gt;Two things worth being straight about. First, pattern matching can only catch what the patterns describe. The docs say checks use "built-in and your own patterns", so a secret in an unusual format, or one an agent has transformed, is outside what a pattern catches until someone adds one. Second, the page describes scanning of prompts and MCP tool calls. It does not say that output coming back from a command is scanned, or that files written to disk are scanned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting the two together
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Leak path&lt;/th&gt;
&lt;th&gt;What covers it, per the docs&lt;/th&gt;
&lt;th&gt;What is not stated&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Key pasted into a prompt&lt;/td&gt;
&lt;td&gt;DLP scan blocks the call&lt;/td&gt;
&lt;td&gt;Coverage for unusual formats: only through patterns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Key built into a tool call&lt;/td&gt;
&lt;td&gt;DLP scans MCP tool calls&lt;/td&gt;
&lt;td&gt;Scope beyond MCP tool calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret in repo or &lt;code&gt;.env&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Vault: store once, not in repos or environment files&lt;/td&gt;
&lt;td&gt;Nothing stops someone writing a secret to a file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret echoed in command output&lt;/td&gt;
&lt;td&gt;Not stated&lt;/td&gt;
&lt;td&gt;Whether output is scanned&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret in logs&lt;/td&gt;
&lt;td&gt;Vault: values never in logs or run record; audit names variables only&lt;/td&gt;
&lt;td&gt;Your own application logs inside the sandbox&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Credential valid after the run&lt;/td&gt;
&lt;td&gt;Vault: "stops working when the run, session or lease ends"&lt;/td&gt;
&lt;td&gt;Not stated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Habits that help, whatever the tooling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use short-lived credentials where the system you call supports them.&lt;/strong&gt; A leaked token that expires within an hour is a smaller problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope them narrowly.&lt;/strong&gt; Give the agent a read-only database role for a read-only task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not put credentials in prompts.&lt;/strong&gt; DLP is a safety net, not a plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review the audit log&lt;/strong&gt; after the first few runs. It records what DLP found, where, never the value, and the variable names Vault injected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Assume anything the agent can read, it can print.&lt;/strong&gt; Design for that: if a secret must never reach the model, ask whether the agent needs the secret at all, or whether a narrower service call would do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route risky actions through approvals,&lt;/strong&gt; so a person confirms before an agent uses a credential for something irreversible. See &lt;a href="https://sandscale.dev/security/approvals" rel="noopener noreferrer"&gt;approvals&lt;/a&gt; and &lt;a href="https://sandscale.dev/security/agent-policy" rel="noopener noreferrer"&gt;agent policy&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where this leaves you
&lt;/h2&gt;

&lt;p&gt;Vault keeps the secret out of your code, the API answer, the logs and the model's context in the normal path. DLP catches the abnormal path, a secret typed or built into a prompt or a tool call. Between them they cover the main leak paths that happen before code runs. They do not turn the agent's own commands into a safe place to hold a secret, so the sandbox boundary, narrow credentials and review still matter. For the isolation side, see &lt;a href="https://sandscale.dev/blog/isolating-ai-agent-code-containers-gvisor-firecracker" rel="noopener noreferrer"&gt;our post on isolating agent-run code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://sandscale.dev/security/audit-log" rel="noopener noreferrer"&gt;audit log&lt;/a&gt; ties it together: every action is in a hash-chained log that every plan can read. &lt;a href="https://sandscale.dev/pricing" rel="noopener noreferrer"&gt;Pricing&lt;/a&gt; shows what each plan includes; Vault and DLP are on all of them.&lt;/p&gt;




</description>
      <category>security</category>
      <category>ai</category>
      <category>secrets</category>
      <category>agents</category>
    </item>
    <item>
      <title>Running Claude Code, Codex and Gemini CLI under policy on Sandscale</title>
      <dc:creator>Sandscale</dc:creator>
      <pubDate>Fri, 20 Nov 2026 16:21:39 +0000</pubDate>
      <link>https://dev.to/sandscale/running-claude-code-codex-and-gemini-cli-under-policy-on-sandscale-5bef</link>
      <guid>https://dev.to/sandscale/running-claude-code-codex-and-gemini-cli-under-policy-on-sandscale-5bef</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://sandscale.dev/blog/coding-agents-under-policy-sandscale" rel="noopener noreferrer"&gt;sandscale.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A coding agent that can edit files and run commands needs two kinds of limits: a boundary around where it runs, and rules about what it may do inside that boundary. This post covers how Sandscale handles both for three agents people commonly use, Claude Code, Codex and Gemini CLI. It also says where the controls differ between them, because they do not all work the same way.&lt;/p&gt;

&lt;p&gt;Everything here comes from sandscale.dev as of 20 November 2026. We only describe steps the site documents. Where a step is not documented, we say so instead of guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two ways to run an agent on Sandscale
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The agent runs inside a Sandscale workspace.&lt;/strong&gt; A workspace is a persistent cloud computer: its disk survives, you open it in the browser or over SSH, and it stops when idle. You run Claude Code, Codex, Gemini CLI or your own agent inside it, and it keeps working when your laptop is closed. Workspaces come with Pro and up. Hours count against your plan only while the workspace runs. See &lt;a href="https://sandscale.dev/workspaces" rel="noopener noreferrer"&gt;workspaces&lt;/a&gt; and &lt;a href="https://sandscale.dev/docs/concepts/workspaces" rel="noopener noreferrer"&gt;the workspace docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The agent runs on your machine and uses Sandscale sandboxes over MCP.&lt;/strong&gt; The agent connects to Sandscale's MCP server and calls tools to start a sandbox, run commands in it, move files and stop it. MCP works on every plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting an agent over MCP
&lt;/h2&gt;

&lt;p&gt;The documented command for Claude Code is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add --transport http sandscale https://mcp.sandscale.dev/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first time the agent connects, it opens a Sandscale sign-in and then acts as you. For Codex, VS Code, Windsurf, Claude and ChatGPT, the quickstart says to add a remote MCP server with the same address (&lt;code&gt;https://mcp.sandscale.dev/mcp&lt;/code&gt;). The docs show a Cursor configuration too, in &lt;code&gt;~/.cursor/mcp.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What the connection can do, from &lt;a href="https://sandscale.dev/docs/guides/connect-claude-chatgpt" rel="noopener noreferrer"&gt;Connect Claude or ChatGPT&lt;/a&gt;: start, run, pause, snapshot and stop sandboxes; move files in and out; list, start and stop your workspaces; look at your object storage buckets; and list the names of your Vault secrets. What it cannot do: read Vault values (it lists names only), act as anyone but you, or go unrecorded. Every call goes into your organization's audit log with the tool, region, outcome and app, and never the arguments. Each app can make up to 120 calls a minute, and each person up to 60.&lt;/p&gt;

&lt;h2&gt;
  
  
  What policy does, per agent
&lt;/h2&gt;

&lt;p&gt;This is the part to read carefully. Sandscale's &lt;a href="https://sandscale.dev/security/agent-policy" rel="noopener noreferrer"&gt;agent policy&lt;/a&gt; page describes three steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write the policy&lt;/strong&gt;, per project: what agents may do, what needs a person, and what is never allowed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforce it.&lt;/strong&gt; Claude Code's hooks ask Sandscale before each tool call and prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;See it.&lt;/strong&gt; Every decision is in the session record and the audit log.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For &lt;strong&gt;Claude Code&lt;/strong&gt;, that means enforcement: each prompt is checked, and each tool call is allowed, blocked or sent to a person. Per the page, Claude Code's hooks ask Sandscale before each tool call and prompt.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;Codex and Gemini CLI&lt;/strong&gt;, the page says they "report every step", and the sandboxes page says they report over OpenTelemetry. The pages describe recording for these two agents; they do not describe blocking a call before it runs. If you need a hard block, rely on the isolation boundary, the network allowlist and the plan-level policies on templates, sizes and run times, and treat the per-call record as an after-the-fact trail. &lt;/p&gt;

&lt;h3&gt;
  
  
  What a policy can say
&lt;/h3&gt;

&lt;p&gt;The documented scope of policies, from &lt;a href="https://sandscale.dev/docs/concepts/approvals" rel="noopener noreferrer"&gt;approvals and policies&lt;/a&gt;: which templates, sizes and run times members may use, and which agents may run. Approvals come with every plan; policies for projects come with Team and Enterprise. There is also an organization kill switch that stops its agents at once.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens when a call needs a person
&lt;/h3&gt;

&lt;p&gt;When policy marks a call as needing sign-off, the agent pauses on it. A named approver approves or denies it with a reason in the console's approvals inbox, and nobody can approve their own request. An approved call runs once. The request and the decision are in the audit log. This works on every plan, though project policies that mark which calls need approval are on Team and Enterprise.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rest of the boundary
&lt;/h2&gt;

&lt;p&gt;Policy sits on top of the isolation boundary, not in place of it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Isolation.&lt;/strong&gt; Each sandbox is a Firecracker microVM with its own kernel. For the general trade-offs, see &lt;a href="https://sandscale.dev/blog/isolating-ai-agent-code-containers-gvisor-firecracker" rel="noopener noreferrer"&gt;our post on isolating agent-run code&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network.&lt;/strong&gt; Agents that call model APIs need outbound access. Free uses an egress allowlist; Pro and up can open the network or keep an allowlist (see &lt;a href="https://sandscale.dev/pricing" rel="noopener noreferrer"&gt;pricing&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secrets and DLP.&lt;/strong&gt; Secrets live in Vault and do not go into prompts. DLP scans prompts and MCP tool calls before they leave, on every plan. See &lt;a href="https://sandscale.dev/security/vault" rel="noopener noreferrer"&gt;Vault&lt;/a&gt; and &lt;a href="https://sandscale.dev/security/dlp" rel="noopener noreferrer"&gt;DLP&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Record.&lt;/strong&gt; Every action goes into a hash-chained &lt;a href="https://sandscale.dev/security/audit-log" rel="noopener noreferrer"&gt;audit log&lt;/a&gt;. All plans can read it; export is Team and up.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Handing tasks to agents: Agent Cloud
&lt;/h2&gt;

&lt;p&gt;For coding tasks, Agent Cloud gives a task to an agent such as Claude Code or Codex running in one of your workspaces. You watch it work and can pause or stop it. The result is a branch and a pull request for you to review. Each step goes through your organization's policies and approvals and lands in the audit log. Agent Cloud comes with Pro and up, runs in workspaces, and uses your plan's vCPU-hours.&lt;/p&gt;

&lt;p&gt;The review step matters: the output is a pull request, not a merge. A person reads the diff before it lands.&lt;/p&gt;

&lt;h2&gt;
  
  
  A sensible setup, using only what is documented
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create a Pro (or higher) account and a workspace from a template (see the &lt;a href="https://sandscale.dev/docs/guides/workspaces" rel="noopener noreferrer"&gt;workspace guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Run your agent in the workspace.&lt;/li&gt;
&lt;li&gt;Keep the network on an allowlist where you can.&lt;/li&gt;
&lt;li&gt;Put secrets in Vault, not in the repo or the prompt.&lt;/li&gt;
&lt;li&gt;For Claude Code, write a policy that marks the risky tool calls as needing a person, and choose approvers other than the person who started the run.&lt;/li&gt;
&lt;li&gt;Read the audit log after the first few runs and adjust.&lt;/li&gt;
&lt;li&gt;For Codex and Gemini CLI, treat the recorded steps as a trail and keep the boundary tight.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What this does not cover
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent behavior inside the box.&lt;/strong&gt; The boundary and the policy limit what a call can do. They do not make the agent's decisions correct.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model-side behavior.&lt;/strong&gt; "We provide the machine, not the model" is how the FAQ puts it: you bring the agent and its model access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anything we have not documented.&lt;/strong&gt; If this post says something is not published, that is where Sandscale's docs currently end. We would rather say so than fill the gap.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to try it, &lt;a href="https://sandscale.dev/pricing" rel="noopener noreferrer"&gt;pricing&lt;/a&gt; shows which plan includes workspaces and policies, and the &lt;a href="https://sandscale.dev/docs/quickstart" rel="noopener noreferrer"&gt;quickstart&lt;/a&gt; has the MCP connection commands.&lt;/p&gt;




</description>
      <category>ai</category>
      <category>security</category>
      <category>devops</category>
      <category>agents</category>
    </item>
    <item>
      <title>Containers, gVisor or Firecracker: how to isolate code your AI agent wrote</title>
      <dc:creator>Sandscale</dc:creator>
      <pubDate>Fri, 20 Nov 2026 16:12:40 +0000</pubDate>
      <link>https://dev.to/sandscale/containers-gvisor-or-firecracker-how-to-isolate-code-your-ai-agent-wrote-3fbd</link>
      <guid>https://dev.to/sandscale/containers-gvisor-or-firecracker-how-to-isolate-code-your-ai-agent-wrote-3fbd</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://sandscale.dev/blog/isolating-ai-agent-code-containers-gvisor-firecracker" rel="noopener noreferrer"&gt;sandscale.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An AI coding agent writes code and runs it, often with no one reading it first. The code may be buggy, may pull in a dependency nobody vetted, or may have been steered by text in a web page the agent read. You need a boundary around that code so a mistake or an attack stays inside it.&lt;/p&gt;

&lt;p&gt;There are three common ways to draw that boundary: a plain container, a container run under gVisor, and a microVM such as Firecracker. They differ in what the untrusted code can touch directly, and the differences are easy to flatten into "VMs good, containers bad". That is not quite right, and this post tries to say why. It uses each project's own documentation, quotes only figures those documents publish, and says where we are stating an opinion.&lt;/p&gt;

&lt;h2&gt;
  
  
  The threat model
&lt;/h2&gt;

&lt;p&gt;Start with what you are defending and from whom.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The attacker.&lt;/strong&gt; Treat the code in the sandbox as hostile, even if the person who started the run is not. Typical ways it gets there: prompt injection through content the agent reads, a malicious or compromised package, or generated code that does something destructive by accident. The Firecracker design document takes the same stance toward guests: "all vCPU threads are considered to be running malicious code as soon as they have been started" (FCD).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you want to protect.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The host machine and its other tenants (the other runs on the same hardware).&lt;/li&gt;
&lt;li&gt;Credentials the agent holds, such as API keys and tokens.&lt;/li&gt;
&lt;li&gt;Your network: internal services reachable from the sandbox.&lt;/li&gt;
&lt;li&gt;Your bill and availability: a runaway process can consume CPU, memory or disk.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ways out.&lt;/strong&gt; gVisor's security documentation breaks an attack surface into classes. Two matter here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;system API&lt;/strong&gt;: the system calls, files and sockets the code is allowed to use. gVisor notes that bugs here "are also the most common form of exploit" (GVS).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;system ABI&lt;/strong&gt;: hardware and privileged-code behavior that does not go through the intended API. gVisor cites a hypervisor flaw to make the point that "hypervisors are not immune to this vector" (GVS).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A third class is hardware side channels, which can affect any code on a machine, sandboxed or not. gVisor says it generally does not protect against them (GVS). The Firecracker paper likewise says anyone adopting Firecracker "must understand" side-channel attacks "and have plans to mitigate them" (FCP, section 3.4).&lt;/p&gt;

&lt;p&gt;Isolation is only one layer of the answer. It stops code from reaching the host. It does not decide which hosts the code may call, which secrets it can read, or what an approved action is. Those need network policy, secret handling and review, covered near the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 1: containers (shared kernel)
&lt;/h2&gt;

&lt;p&gt;A container is an ordinary Linux process (or group of processes) with a restricted view of the system. The kernel provides the restrictions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Namespaces&lt;/strong&gt; wrap a global resource, such as process IDs, mount points or the network stack, so the process sees its own instance (man-pages, namespaces(7)).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;cgroups&lt;/strong&gt; group processes so that their use of resources such as CPU and memory can be limited and monitored (man-pages, cgroups(7)).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capabilities&lt;/strong&gt; split root's powers into pieces. Docker drops most of them by default (DKR).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;seccomp&lt;/strong&gt; filters which system calls the process may make (seccomp(2)). Container runtimes ship a default profile.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key property: the container's processes make system calls into the &lt;strong&gt;same kernel&lt;/strong&gt; that runs everything else on the host. Isolation is enforced by that kernel's own code. If a kernel bug is reachable through an allowed system call, the code in the container has the same route to the host as any other process. The Firecracker paper describes the same trade-off: containers sit directly on the kernel's sandboxing features, while VM-style isolation relies on the VMM and hardware virtualization (FCP, section 2).&lt;/p&gt;

&lt;p&gt;None of this makes containers unsafe for every use. For code you wrote and reviewed, they are a good fit, with excellent compatibility and almost no overhead beyond the process itself. The risk grows as the code becomes less trusted, because the exposed surface is the whole Linux system call interface plus the files and sockets reachable through it. You can shrink it with a tight seccomp profile, dropped capabilities, read-only filesystems and user namespaces. gVisor's documentation points out that in practice it "can be extremely difficult (if not impossible) to reliably define a policy for arbitrary, previously unknown applications" (GVI), which describes the position of a platform running code it has never seen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 2: gVisor (a kernel in user space)
&lt;/h2&gt;

&lt;p&gt;gVisor puts a second kernel between the application and the host. In its own words, it is "an application kernel that implements a Linux-like interface", written in Go and running in user space (GVI).&lt;/p&gt;

&lt;p&gt;The main pieces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Sentry&lt;/strong&gt; is the application kernel. It implements system calls, signal delivery, memory management, the threading model and more. When the application makes a system call, a platform redirects it to the Sentry, which handles it. gVisor states that the Sentry does not pass system calls through to the host kernel (GVS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A restricted host interface.&lt;/strong&gt; The Sentry itself runs with a tight seccomp policy and makes only a small set of host system calls. It cannot open new files or create new sockets directly for the most part (GVS). The Sentry is a pure Go binary with no CGo (GVS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Gofer&lt;/strong&gt; is a separate process that manages the container's filesystem access; file operations go through it (GVS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A platform&lt;/strong&gt; intercepts the application's system calls. gVisor documents three: KVM, systrap and ptrace. Systrap uses seccomp's trap feature to hand each system call to gVisor, and replaced ptrace as the default in mid-2023. The KVM platform uses the KVM facility so the Sentry acts as both guest OS and VMM, but "there is no virtualized hardware layer" and the sandbox "retains a process model" (GVP).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So an exploit in the application first has to find a flaw in the Sentry's implementation of a Linux-like interface, and then escape a Sentry that is itself confined. That is defense in depth, with an independently written kernel in the way.&lt;/p&gt;

&lt;p&gt;The costs, as gVisor describes them: the design "comes at the price of reduced application compatibility and higher per-system call overhead" (GVI). It "only implements a subset of the Linux syscall ABI"; the missing part is "mostly comprised of alternatives to existing syscalls that gVisor does support", and &lt;code&gt;io_uring&lt;/code&gt; is called out as not fully supported (GVC). The project adds that compatibility issues are not common in practice for most workloads, citing its use in products like Google Cloud Run and DigitalOcean App Platform (GVC), and that "the only real way to know if it will work is to try."&lt;/p&gt;

&lt;p&gt;For agents, the compatibility question is concrete. Agents run package managers, compilers, test suites, language servers, headless browsers and sometimes Docker inside the sandbox. Each of those uses a wider and odder slice of the kernel than a typical web service. It is worth testing your own toolchain, not assuming.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer 3: microVMs (hardware virtualization)
&lt;/h2&gt;

&lt;p&gt;A microVM gives the code its own virtual machine: its own guest kernel, running on virtualized hardware. The host's KVM facility, with the CPU's virtualization extensions, enforces the boundary between the guest and the host.&lt;/p&gt;

&lt;p&gt;Firecracker is a virtual machine monitor (VMM) that uses KVM to create and run microVMs. Its README describes microVMs that "combine the security and isolation properties provided by hardware virtualization technology with the speed and flexibility of containers" (FCR). The design choices that matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A minimal device model.&lt;/strong&gt; Firecracker "excludes unnecessary devices and guest-facing functionality to reduce the memory footprint and attack surface area of each microVM" (FCR). Guests get VirtIO network and block devices, a serial console and a small set of legacy pieces (FCD). The device emulation code is one of the main things a hostile guest can reach, so fewer devices means less to attack. gVisor makes the related point that a VM's security "depends to a large extent on what is exposed from the host kernel and userspace support code" (GVS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One process per microVM&lt;/strong&gt;, with threads for the API, the VMM and each vCPU (FCD).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The jailer.&lt;/strong&gt; In production, Firecracker is started through a wrapper that puts the Firecracker process into a chroot, separate PID and network namespaces, with privileges dropped and a seccomp-bpf profile (FCJ; FCP section 3.4.1). The seccomp allowlist is documented in the jailer docs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Host configuration still matters.&lt;/strong&gt; The README states that the security of the microVMs "depends on a well configured Linux host operating system" and links a production host setup guide (FCR).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Firecracker paper reports, for its minimal guest kernel configuration, "memory overhead of less than 5MB per container", boot "to application code in less than 125ms", and creation of "up to 150 MicroVMs per second per host" (FCP). These are the authors' published figures for their configuration in 2020, not a promise for any particular deployment, and the paper's boot measurement uses a minimal init and a single vCPU. The design doc gives a different configuration-specific figure: with a minimal Linux kernel, single-core CPU and 128 MiB of RAM, "5 microVMs per host core per second" (FCD).&lt;/p&gt;

&lt;p&gt;What you give up: a guest kernel to boot and keep patched per image, a VMM and host kernel (KVM) that are themselves software with bugs, and a need for KVM on the host. That last point means hardware virtualization on the host. gVisor's documentation warns that nested virtualization "may bring challenges" for performance (GVI) and that its own KVM platform runs best on bare metal (GVP). Firecracker also supports a limited feature set. As of the 2020 paper, it says it does not emulate legacy devices or PCI, cannot boot arbitrary kernels, and could not boot Windows without significant work (FCP).&lt;/p&gt;

&lt;p&gt;Firecracker's design document also notes that it "does not perform any network traffic filtering. All egress traffic from a guest is therefore considered untrusted, and should be filtered at the host-level" (FCD). The VM boundary does not give you a network policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Side by side
&lt;/h2&gt;

&lt;p&gt;This table is qualitative on purpose. Where a number would go, it is in the sections above with its source.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Container&lt;/th&gt;
&lt;th&gt;Container under gVisor&lt;/th&gt;
&lt;th&gt;MicroVM (Firecracker)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Who handles the code's system calls&lt;/td&gt;
&lt;td&gt;The host kernel&lt;/td&gt;
&lt;td&gt;The Sentry, in user space (GVS)&lt;/td&gt;
&lt;td&gt;A separate guest kernel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What the code can reach on the host&lt;/td&gt;
&lt;td&gt;The host's Linux syscall interface, narrowed by seccomp, capabilities and namespaces&lt;/td&gt;
&lt;td&gt;The Sentry's implementation, and through it a small set of host calls&lt;/td&gt;
&lt;td&gt;The VMM's device emulation and KVM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main bet on security&lt;/td&gt;
&lt;td&gt;Kernel correctness plus a tight policy&lt;/td&gt;
&lt;td&gt;A smaller, memory-safe reimplementation, confined&lt;/td&gt;
&lt;td&gt;Hardware virtualization plus a minimal VMM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compatibility with arbitrary Linux software&lt;/td&gt;
&lt;td&gt;Highest&lt;/td&gt;
&lt;td&gt;A subset of the syscall ABI (GVC); test your toolchain&lt;/td&gt;
&lt;td&gt;A real Linux guest, so high; no GPU or exotic devices unless the VMM supports them&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per-call overhead&lt;/td&gt;
&lt;td&gt;None added&lt;/td&gt;
&lt;td&gt;Higher per-system call overhead (GVI)&lt;/td&gt;
&lt;td&gt;System calls stay inside the guest kernel; I/O crosses the VMM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fixed overhead per sandbox&lt;/td&gt;
&lt;td&gt;Smallest&lt;/td&gt;
&lt;td&gt;Small, "process-like" resource model (GVI)&lt;/td&gt;
&lt;td&gt;A guest kernel and a VMM process per sandbox; Firecracker reports low figures for a minimal setup (FCP)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Host requirements&lt;/td&gt;
&lt;td&gt;Any Linux&lt;/td&gt;
&lt;td&gt;Any Linux; KVM platform optional (GVP)&lt;/td&gt;
&lt;td&gt;KVM (or a supported alternative)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operations&lt;/td&gt;
&lt;td&gt;Image build and patching; policy tuning&lt;/td&gt;
&lt;td&gt;Runtime install; track compatibility&lt;/td&gt;
&lt;td&gt;Guest kernel and image management; host virtualization setup; VMM patching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Side channels&lt;/td&gt;
&lt;td&gt;Not addressed&lt;/td&gt;
&lt;td&gt;Not addressed (GVS)&lt;/td&gt;
&lt;td&gt;Not addressed by default; the paper tells adopters to plan mitigations (FCP)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;gVisor's own FAQ gives the caution that applies to the whole table: one "should not assume that the mere use of virtualization hardware makes a system more or less secure" (GVS). A well-built user-space kernel can beat a sloppy VMM setup, and a minimal VMM on hardware virtualization is a strong boundary. The product of the design and its operation is what you get.&lt;/p&gt;

&lt;h2&gt;
  
  
  What none of these solve
&lt;/h2&gt;

&lt;p&gt;Isolation answers one question: can the code reach beyond its box? It leaves several others open.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Egress.&lt;/strong&gt; A sandbox that can call any address can leak data, fetch payloads, or hit your internal services. Decide what the box may reach, and filter at the host or with a policy layer. Firecracker says this itself (FCD).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secrets.&lt;/strong&gt; If an API key is in the box's environment, hostile code can read it. Inject secrets only where needed, for as long as needed, and keep them out of prompts and logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What the agent is allowed to do.&lt;/strong&gt; An agent with a valid token can do real damage inside its own box's permissions. Approval steps for risky actions, and a record of every action, are separate controls from the isolation boundary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resources.&lt;/strong&gt; Set CPU, memory, disk and time limits per run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State between runs.&lt;/strong&gt; A box reused across tasks or users carries leftovers. One box per run, destroyed afterward, is simpler to reason about.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Choosing
&lt;/h2&gt;

&lt;p&gt;A rough guide, with opinion marked as such:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Containers&lt;/strong&gt; fit code you or your team wrote and reviewed. Add a tight seccomp profile, dropped capabilities and a non-root user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;gVisor&lt;/strong&gt; fits when you want stronger isolation than a container without requiring hardware virtualization, and your workloads fit within its supported syscalls. Test the exact tools your agents use first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MicroVMs&lt;/strong&gt; fit when the code is fully untrusted and varied, when you want a full Linux guest for compatibility, and when you can provide KVM on your hosts. In our view, this is the safer default for running arbitrary agent-written code, with the trade-off that you now operate guest kernels and a VMM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Layers combine.&lt;/strong&gt; Firecracker's jailer is itself a set of containers-style restrictions around the VMM, and gVisor stacks seccomp under its Sentry. "Which one" is rarely the whole decision.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where Sandscale sits
&lt;/h2&gt;

&lt;p&gt;Sandscale runs each sandbox as its own Firecracker microVM with its own kernel, one per run, started from the API or MCP. The &lt;a href="https://sandscale.dev/sandboxes" rel="noopener noreferrer"&gt;sandboxes page&lt;/a&gt; describes the lifecycle (pause with memory kept, snapshots, stop), and the &lt;a href="https://sandscale.dev/security" rel="noopener noreferrer"&gt;security overview&lt;/a&gt; covers the controls around the boundary: secrets in Vault, DLP, approvals and a hash-chained audit log. &lt;a href="https://sandscale.dev/security/agent-policy" rel="noopener noreferrer"&gt;Agent policy&lt;/a&gt; describes how tool calls are checked.&lt;/p&gt;

&lt;p&gt;We chose microVMs for the reasons above, and we also take the limits above seriously: a microVM does not by itself filter egress, protect secrets or decide what an agent may do. If you are comparing options, run your own toolchain through each one before you decide.&lt;/p&gt;




</description>
      <category>security</category>
      <category>ai</category>
      <category>firecracker</category>
      <category>containers</category>
    </item>
    <item>
      <title>Awake-time billing for agent sandboxes: what you pay for and what you don't</title>
      <dc:creator>Sandscale</dc:creator>
      <pubDate>Fri, 20 Nov 2026 16:10:49 +0000</pubDate>
      <link>https://dev.to/sandscale/awake-time-billing-for-agent-sandboxes-what-you-pay-for-and-what-you-dont-55gh</link>
      <guid>https://dev.to/sandscale/awake-time-billing-for-agent-sandboxes-what-you-pay-for-and-what-you-dont-55gh</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://sandscale.dev/blog/awake-time-billing-agent-sandboxes" rel="noopener noreferrer"&gt;sandscale.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;An agent run is mostly waiting. It calls a model, waits for tokens, runs a command for a few seconds, waits for the next tool call, and sometimes sits for an hour because a person has to approve something. If a sandbox bills for every second it exists, you pay for that waiting. Sandscale bills for the time the box is awake instead. This post explains what that means, how the numbers work, and where the model stops being cheaper than you might assume.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "awake vCPU-hour" means
&lt;/h2&gt;

&lt;p&gt;The unit is one vCPU running for one hour while the box is awake. A box that is paused, or idle between tool calls, does not count. For how metering works in detail, see &lt;a href="https://sandscale.dev/pricing" rel="noopener noreferrer"&gt;pricing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sandscale's own example: a 2 vCPU agent box that is open for 10 hours and awake 10% of the time uses 2 awake vCPU-hours (2 vCPU × 1 awake hour).&lt;/p&gt;

&lt;p&gt;So the formula is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;awake vCPU-hours = vCPU count × hours awake
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What is free and what isn't
&lt;/h2&gt;

&lt;p&gt;Free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Paused time.&lt;/strong&gt; Pausing a sandbox writes its memory out alongside its files. Resuming reads the memory back and the processes carry on. A paused sandbox doesn't use vCPU-hours. Pause and resume are available on every plan (see &lt;a href="https://sandscale.dev/sandboxes/pause-and-resume" rel="noopener noreferrer"&gt;pause and resume&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Idle time between tool calls.&lt;/strong&gt; The box stays open and you aren't charged for the gaps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Awake time&lt;/strong&gt;, at the vCPU count you chose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage above your allowance.&lt;/strong&gt; One allowance covers disks, snapshots, templates and objects: Free 5 GB, Pro 50 GB, Team 100 GB per member (pooled). Above that it is $0.15 per GB-month. The first 10 GB of snapshots and templates is free.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Burst above base size&lt;/strong&gt;, which counts in the same hours (see below).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How memory is counted
&lt;/h2&gt;

&lt;p&gt;Every vCPU comes with 4 GiB of memory, included in the price. Memory above that is converted: 4 GiB-hours of extra memory counts as 1 vCPU-hour. So a 2 vCPU box has 8 GiB included. A 2 vCPU box with 16 GiB has 8 GiB extra, which counts as 2 extra vCPU-hours for every hour, on top of the 2 for CPU.&lt;/p&gt;

&lt;h2&gt;
  
  
  What your plan includes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Free&lt;/th&gt;
&lt;th&gt;Pro&lt;/th&gt;
&lt;th&gt;Team&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Price&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$20/mo billed annually, $25 monthly&lt;/td&gt;
&lt;td&gt;$40/member/mo billed annually, $48 monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Included awake vCPU-hours / month&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;td&gt;1,500&lt;/td&gt;
&lt;td&gt;2,000 per member, pooled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boxes running at once&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;30, more on request&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Largest box&lt;/td&gt;
&lt;td&gt;up to 2 vCPU&lt;/td&gt;
&lt;td&gt;up to 16 vCPU&lt;/td&gt;
&lt;td&gt;up to 16 vCPU, 32 on request&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Session length&lt;/td&gt;
&lt;td&gt;up to 4 h&lt;/td&gt;
&lt;td&gt;up to 24 h&lt;/td&gt;
&lt;td&gt;up to 24 h&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Beyond your hours&lt;/td&gt;
&lt;td&gt;new boxes wait until next month&lt;/td&gt;
&lt;td&gt;$0.05 per awake vCPU-hour, or $10 per 500-hour pack, or keep it off&lt;/td&gt;
&lt;td&gt;same as Pro&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Included hours reset every month and do not roll over. Running boxes are never stopped because your hours ran out. On paid plans you decide what happens at the limit: turn on usage beyond the plan at $0.05 per awake vCPU-hour, buy a pack of 500 awake vCPU-hours for $10 ($0.02 per vCPU-hour), or leave it off so new boxes wait. Spend caps can be set per task, agent, project and organization.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example (hypothetical workload)
&lt;/h2&gt;

&lt;p&gt;This is an invented workload for illustration, not a measurement of any real customer or run.&lt;/p&gt;

&lt;p&gt;An agent run on a 2 vCPU box (8 GiB, within the included 4 GiB per vCPU):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The box is open for 60 minutes.&lt;/li&gt;
&lt;li&gt;It is awake for 10 minutes, running commands, tests and file edits.&lt;/li&gt;
&lt;li&gt;It is idle for 50 minutes, waiting on a model or a human reviewer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Awake-time billing:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 vCPU × (10 / 60) h = 0.333 awake vCPU-hours per run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;If the same run were billed for the whole hour it existed:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 vCPU × 1 h = 2 vCPU-hours per run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The ratio is 2 / 0.333 = 6. That ratio is just the share of the hour that was awake (1/6). It is not a general claim; if your agent is awake 50 minutes out of 60, the gap nearly disappears.&lt;/p&gt;

&lt;h3&gt;
  
  
  Over a month
&lt;/h3&gt;

&lt;p&gt;Say a team runs 1,000 such runs in a month, one box per run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Awake-time:          1,000 × 0.333 = 333.3 awake vCPU-hours
Billed whole hour:   1,000 × 2     = 2,000 vCPU-hours
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the Pro plan (1,500 included hours, $20/month billed annually):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;333.3 awake vCPU-hours is inside the 1,500 included. Monthly cost is the plan price: $20.&lt;/li&gt;
&lt;li&gt;2,000 vCPU-hours would be 500 over. At Sandscale's published overage rate that is 500 × $0.05 = $25 extra, or one $10 hour pack (500 hours). So $30 with the pack, or $45 with overage turned on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last two lines apply Sandscale's own rates to a different billing basis to show the shape of the difference. They are not what any other provider charges; other providers have their own rates, rounding and rules, and you should run your own numbers from their published pricing.&lt;/p&gt;

&lt;p&gt;On the Free plan (100 hours), the monthly total above would not fit in either case: 333.3 awake vCPU-hours exceeds 100, and new boxes would wait until next month. Free is for trying things out.&lt;/p&gt;

&lt;h3&gt;
  
  
  A second check, from the pricing page
&lt;/h3&gt;

&lt;p&gt;Sandscale's own pricing page gives this one: one developer on Pro whose agent keeps a 2 vCPU box open 8 hours every working day, awake a quarter of the time, uses about 88 awake vCPU-hours, inside the 1,500 included.&lt;/p&gt;

&lt;h2&gt;
  
  
  Burst: when a box gets bigger for a while
&lt;/h2&gt;

&lt;p&gt;A box has a base size and a burst limit you set. Pro allows up to 4× the base; Team up to 8×. The box runs at base size, bursts when a job needs more CPU or memory, then returns to base. Burst draws from the same hours and counts only the CPU actually used above base: a minute at 8 vCPU uses 8 vCPU-minutes.&lt;/p&gt;

&lt;p&gt;For the example above, a 2 vCPU base that bursts to 8 vCPU for two of its ten awake minutes would use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8 vCPU × 2 min + 2 vCPU × 8 min = 16 + 16 = 32 vCPU-minutes = 0.533 awake vCPU-hours
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is above the 0.333 base case. Burst is useful for a test run or a compile step, but it moves the number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this model doesn't help
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Busy agents.&lt;/strong&gt; If a box is awake nearly all the time (long builds, a model running locally, a tight loop of tool calls), awake time is close to wall-clock time and the idle discount is small.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Things that must stay on.&lt;/strong&gt; A workspace that needs to accept connections at any time never sleeps. Sandscale sells an always-on workspace as an add-on: $9 a month for 2 vCPU and 8 GiB, or $19 a month for 4 vCPU and 16 GiB with a 50 GB disk, at a flat price that uses none of your hours. Regular workspaces sleep when idle and wake when you connect (Free: after 30 minutes idle).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage.&lt;/strong&gt; Idle boxes cost no vCPU-hours, but disks, snapshots and templates count against the storage allowance whether the box is awake or not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dedicated cores.&lt;/strong&gt; If you need guaranteed full speed with no oversubscription, that is $0.04 per vCPU-hour and billed by wall clock, not awake time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to keep the number small
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pause instead of leaving a box idle during a long review.&lt;/strong&gt; Memory and files are kept, so the agent carries on where it stopped. See &lt;a href="https://sandscale.dev/sandboxes/pause-and-resume" rel="noopener noreferrer"&gt;pause and resume&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Snapshot after setup.&lt;/strong&gt; Install dependencies once, save the sandbox, and start new ones from that point so the awake clock isn't spent on &lt;code&gt;pip install&lt;/code&gt; every run. See &lt;a href="https://sandscale.dev/sandboxes/snapshots" rel="noopener noreferrer"&gt;snapshots&lt;/a&gt;; the &lt;a href="https://sandscale.dev/pricing" rel="noopener noreferrer"&gt;pricing&lt;/a&gt; table lists them on every plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set a &lt;code&gt;timeoutSeconds&lt;/code&gt;&lt;/strong&gt; so a stuck script is stopped. The quickstart shows &lt;code&gt;timeoutSeconds: 600&lt;/code&gt; on create (see &lt;a href="https://sandscale.dev/docs/quickstart" rel="noopener noreferrer"&gt;quickstart&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set spend caps&lt;/strong&gt; per task or agent, or leave usage beyond your included hours off, so a loop can't run past your plan. See &lt;a href="https://sandscale.dev/pricing" rel="noopener noreferrer"&gt;pricing&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick the smallest box that works.&lt;/strong&gt; Awake hours scale with vCPU count; a 2 vCPU box uses half of what a 4 vCPU box does for the same wall-clock work, if the job isn't CPU-bound.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it with your own numbers
&lt;/h2&gt;

&lt;p&gt;The only reliable way to know is to look at your own agents. Run a few representative tasks and compare how long each box is open with how long it is awake. If the plan limits matter to you, the &lt;a href="https://sandscale.dev/docs/reference/plans" rel="noopener noreferrer"&gt;plans reference&lt;/a&gt; lists them, and &lt;a href="https://sandscale.dev/pricing" rel="noopener noreferrer"&gt;pricing&lt;/a&gt; has the full table. Free includes 100 awake vCPU-hours a month.&lt;/p&gt;

&lt;p&gt;You can &lt;a href="https://cloud.sandscale.dev/auth/signup" rel="noopener noreferrer"&gt;start free&lt;/a&gt; or read how a &lt;a href="https://sandscale.dev/sandboxes" rel="noopener noreferrer"&gt;sandbox&lt;/a&gt; is isolated and started.&lt;/p&gt;




</description>
      <category>ai</category>
      <category>devops</category>
      <category>cloud</category>
      <category>pricing</category>
    </item>
  </channel>
</rss>
