Cmd. /sandbox-add-read-dir
Grant sandbox read access to an additional absolute directory path.
Key takeaways
/sandbox-add-read-dir <absolute-path>grants the sandbox read access to one extra directory; the official reference marks it Windows-only.- Use it to let Codex inspect shared SDKs or generated artifacts that sit outside the current workspace.
- It is a read-only grant, not a write permission; use
/permissionsto change edit or execution autonomy. - Pick the narrowest path possible and run
/statusafterward to verify readable roots and the current sandbox policy.
Original Command Declaration
/sandbox-add-read-dir <absolute-directory-path>Official Summary
/sandbox-add-read-dir grants sandbox read access to an extra directory. The official slash command
reference marks it as Windows-only.
Usage
/sandbox-add-read-dir <absolute-directory-path>Good Examples
- 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.
Similar 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 |
Use Cases
- Reading shared SDKs or generated artifacts outside the repository.
- Unblocking sandboxed commands that need a known absolute path.
- Documenting temporary read scopes during support sessions.
Cautions
- Use the narrowest path possible.
- This is not a write permission command.
- Do not assume the command exists on non-Windows environments.
Release Basis
- Judgment: confirmed addition
- First evidence version:
rust-v0.102.0 - Date (UTC): 2026-02-17
- Release link: https://github.com/openai/codex/releases/tag/rust-v0.102.0
- Supporting PR: https://github.com/openai/codex/pull/11512
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex CLI features: https://developers.openai.com/codex/cli/features