# Sandbox

> A boundary that limits which files and network resources an AI agent can reach, so it can work without free rein over your computer.

**Category:** ChatGPT

**A sandbox is the fence an agent works inside.** For [Codex](/glossary#codex), it usually means the workspace folder you opened: it can read and change files there, and needs permission to go beyond it.

On top of the sandbox sits the **permission mode**. **Ask for approval** asks you before Codex edits files outside the workspace or uses the internet, and is where OpenAI recommends starting. **Approve for me** keeps the same fence but sends border crossings to an automatic review. **Full access** removes the fence. Changing who approves never widens the sandbox itself.

## At work

Trying Codex for the first time? Open a dedicated folder, leave it on Ask for approval, and read every request to step outside.

## Often confused with

A test environment. A test environment is a copy of a system to try things safely; a sandbox is the limit on what the agent can touch, wherever it runs.

## Related terms

- Codex
- Prompt injection
- Diff

## See it in a lesson

[Codex](/en/learn/chatgpt/advanced/codex)

## Further reading

- [Permission modes (ChatGPT Learn)](https://learn.chatgpt.com/codex/permission-modes): Ask for approval, Approve for me, Full access.
- [Sandbox (ChatGPT Learn)](https://learn.chatgpt.com/codex/sandboxing): How the sandbox limits files and network.
- [Sandbox (Wikipedia)](https://en.wikipedia.org/wiki/Sandbox_(computer_security)): The general security idea.

---

Last updated: 14/10/2026  
Source: Rollo Academy glossary
