Cmd. /sandbox-add-read-dir
Grant sandbox read access to an additional absolute directory path.
Key takeaways
- Grant sandbox read access to an additional absolute directory path.
- Check the input surface and availability before using the examples below.
Purpose
Grant sandbox read access to an additional absolute directory path.
/sandbox-add-read-dir <absolute-directory-path>Availability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Built-in |
| Status | Conditional |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-09-22 · Codex CLI 0.155.1 |
Native Windows only; distinguish this from Linux sandboxing under WSL.
Examples
/sandbox-add-read-dirWhen to use it
- Add a read-only dependency directory outside the current workspace when Codex must inspect it.
- Use
/statusafterward to verify the readable roots and current sandbox policy.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/sandbox-add-read-dir | Adds read access to an absolute path | A Windows sandbox blocks needed reads |
/permissions | Changes broader approval policy | You need to change edit or execution autonomy |
/status | Shows roots and policy | You need to audit the current scope |
Effects and persistence
Adds a readable directory to the Windows sandbox without granting write access.
/sandbox-add-read-dir grants sandbox read access to an extra directory. The official slash command
reference marks it as Windows-only.
Cautions
- Use the narrowest path possible.
- This is not a write permission command.
- Do not assume the command exists on non-Windows environments.
Official sources
Complete command list · Verification scope · History for this command