concepts/sandboxing.md +37 −0
36inside enforced limits. That makes it easier to let Codex work independently36inside enforced limits. That makes it easier to let Codex work independently
37while still knowing when it will stop and ask for help.37while still knowing when it will stop and ask for help.
38 38
39## Getting started
40
41Codex applies sandboxing automatically when you use the default permissions
42mode.
43
44### Prerequisites
45
46On **macOS**, sandboxing works out of the box using the built-in Seatbelt
47framework.
48
49On **Windows**, Codex uses the native [Windows
50sandbox](https://developers.openai.com/codex/windows#windows-sandbox) when you run in PowerShell and the
51Linux sandbox implementation when you run in WSL2.
52
53On **Linux and WSL2**, install `bubblewrap` with your package manager first:
54
55```bash
56sudo apt install bubblewrap
57```
58
59```bash
60sudo dnf install bubblewrap
61```
62
63Codex uses the system `bwrap` at `/usr/bin/bwrap` when it is available. If it
64is missing, Codex falls back to a bundled helper, but that helper requires
65unprivileged user namespaces. Installing your distro’s `bubblewrap` package is
66the most reliable setup.
67
68Codex surfaces a startup warning when `bwrap` is missing or cannot create user
69namespaces. On distributions that restrict them with AppArmor, you can enable
70them with:
71
72```bash
73sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
74```
75
39## How you control it76## How you control it
40 77
41Most people start with the permissions controls in the product.78Most people start with the permissions controls in the product.