Skip to content

sandbox

A sandbox is an isolated environment that limits which files, programs, and network destinations an AI agent can reach while it works. Sandboxes matter in agentic coding because an agent runs commands on someone’s behalf, and a mistaken or manipulated command can delete files or leak data. The term covers two broad setups:

  • Local sandbox: Restrictions enforced by the operating system on the user’s own computer, such as the sandbox modes in Codex CLI and Claude Code, or a container
  • Remote sandbox: A separate machine, often a temporary cloud computer, where the agent works away from personal files

Permission prompts are a related but separate safeguard. They ask a person before an action runs, while a sandbox limits what can happen even after approval. Neither undoes changes an agent makes to outside services it’s logged in to, such as email or cloud documents. Sandboxes also contain the damage from prompt injection.

A person standing next to a machine labeled Codex CLI that processes code through a conveyor belt, with a terminal screen, colorful blocks, and buttons labeled Add, Delete, and Clear All.

Tutorial

How to Add Features to a Python Project With Codex CLI

Learn how to use Codex CLI to add features to Python projects via the terminal. Master AI-powered coding without needing a browser or IDE plugins.

intermediate ai tools

For additional information on related topics, take a look at the following resources:

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Sarah Jane Ross • Updated Oct. 13, 2026