IKANGAIVibe Support
All articles
Security

Why your AI tool should work in a box

ForClaude CodeCursor

Is this for you?

Tick anything that is true for you. If nothing is, you can skip this explainer.This applies to you. Go to the steps

What it is

An AI tool that builds your app on your computer does more than write text. It runs commands: it installs add-ons, starts your app, runs tests. Without limits, those commands run with your own access. The UK’s National Cyber Security Centre (NCSC) points out that an AI tool running on your computer may be able to use any login or key your own user account has.

A sandbox is a fenced-off space for those commands. They still run, but only reach the folders and websites you allow. The NCSC, writing for organisations, says to always run AI tools that act on their own inside a sandbox that controls what they can reach, both on the computer and over the internet.

Why not just approve every command? Simon Willison, writing on the blog of Prime Radiant, an AI research lab, calls that a terrible way to work: it is slow, and people soon approve everything without reading. Built-in safety checks help, he writes, but they still depend on an AI judging each step correctly. A sandbox does not depend on anyone’s judgment.

There are two reasons to want one. AI tools make mistakes. And they can be tricked: a web page or file the tool reads may contain hidden instructions that it then follows. Willison notes that cheaper models and models running on your own computer make more mistakes and are easier to trick this way.

How it works

A sandbox draws three lines. Files: commands may change your project folder, and the rest of your computer is off limits for changes. Internet: by default nothing goes out, and you list the websites commands may reach, such as the place add-ons are downloaded from. Keys: secret keys stay outside.

The NCSC describes the internet line as a ladder. At the bottom, a tool can reach any website. One step up, only a list of approved websites. At the top, nothing outside at all. It describes the walls the same way: none; a separate compartment on the same computer, which can still be broken out of; a separate virtual computer; and, strongest, a separate machine.

Keys are the clever part. Both the NCSC and Prime Radiant describe a go-between that adds the real key to a request on its way out, so the AI tool only ever sees a stand-in. Prime Radiant released free prototypes on 16 November 2026 that do this. They keep the AI tool itself outside the box and send only its commands in, which they call an external sandbox. They say the prototypes are experimental and not yet checked well enough for sensitive work.

You do not need their prototypes to start. Claude Code has a sandbox for the commands it runs. It is off until you switch it on, and its list of allowed websites starts empty. Cursor runs commands in a sandbox on Mac and Linux in its recommended mode, Auto-review. In its Run Everything mode there is no sandbox. Bolt is different: it runs your project inside your browser, so nothing it builds runs directly on your computer.

What to watch out for

Built-in boxes have gaps. Claude Code’s sandbox covers commands only. Its own reading and editing of files and its connectors to other services run outside it. By default, commands inside it can still read most of your computer, including files where keys are often kept, and they receive any secret keys Claude Code itself was started with, unless you block them.

The box can open. When a command fails inside it, both tools can run it again outside. Claude Code may ask you first, depending on your settings. Cursor passes the rerun to its own AI reviewer, and its documentation says that reviewer can make mistakes and is not a security boundary. Those requests are the moment the box opens, so read them.

The box may not be there. Claude Code’s sandbox runs on Mac, Linux and Windows through WSL2, a built-in way to run Linux on Windows; on plain Windows it runs commands without one. If the sandbox cannot start, Claude Code carries on without it unless you tell it to stop.

A box only keeps out what you leave out. Prime Radiant warns that anything in a folder the tool may change can still be damaged, so keep a save point. If you put your live database’s master key inside, or allow its website, the tool can still reach your real customers’ data.

What to tell your AI

5 steps · 2 messages to paste
  1. Message to paste
    Check how you run commands on this computer and explain in plain words. Change nothing yet.
    1. Do the shell commands you run go through a sandbox? Which one, and is it switched on right now?
    2. Inside it, which folders can commands write to and which can they read? Can they read files that hold secrets, such as .env files, ~/.ssh or ~/.aws?
    3. Which websites can commands reach without asking me?
    4. Which of your tools run outside the sandbox (reading and editing files, MCP servers, anything else)?
    5. If a command fails in the sandbox, can it be run again outside it, and would I be asked first?
    Do not print any keys, passwords or tokens.
  2. Message to paste
    Propose sandbox settings for this project. Show me the exact change and wait for my OK before editing any settings file.
    - sandbox enabled, with allowUnsandboxedCommands set to false, so a blocked command is never retried outside the sandbox
    - failIfUnavailable set to true, so you stop instead of running unsandboxed if the sandbox cannot start
    - the sandbox credentials setting to deny reads of files holding secrets (.env files, ~/.ssh, ~/.aws) and to remove secret environment variables from sandboxed commands
    - network access only to the domains this project needs, listed for me first
    Tell me what each change might break. Do not print any secret values.

What this is based on

We read these 5 sources and wrote this explainer from what they establish together. Each entry says what it contributed.

Published . Last checked against its sources on .