Articles / Viewpoints and methods
Updated 11 minFor tool users

Codex Permissions: Full Access, Approvals and config.toml

Start ordinary project edits with workspace-write and on-request approvals. Use the Windows write probe to check whether Codex can write inside your project and is blocked outside it.

Aaron HuangSenior Brand Manager

Reviewed by Aaron Huang · 2026-11-14

For ordinary project edits, start Codex in the project folder with codex --sandbox workspace-write --ask-for-approval on-request. If another folder is blocked, grant that folder explicitly rather than the whole drive. The sandbox controls access; the approval policy controls prompts. The Windows checks below show the difference.

A Windows write test that separates scope from prompts

An approval setting is not a write test. To inspect the filesystem boundary without calling a model, Codex CLI 0.169.0 provides codex sandbox. From a disposable practice directory, create two empty sibling folders:

New-Item -ItemType Directory -Path .\project,.\neighbor
codex sandbox -P :workspace -C .\project powershell.exe -NoProfile -Command "Set-Content -LiteralPath .\inside.txt -Value permission-probe"
$outsidePath = Join-Path (Resolve-Path .\neighbor).Path "outside.txt"
codex sandbox -P :workspace -C .\project powershell.exe -NoProfile -Command "Set-Content -LiteralPath '$outsidePath' -Value permission-probe"

In our Windows test, writing inside project succeeded. Running the write against the resolved path in neighbor failed with UnauthorizedAccessException, and no file appeared there. The same workspace profile therefore permits one write while denying the other. Use only disposable paths for this check.

If PowerShell reports MethodInvocationNotSupportedInConstrainedLanguage in a read-only run, record that as a language restriction, not proof that a filesystem write was attempted. Use a simple cmdlet such as Set-Content for the write probe. If an old command fails with unexpected argument '--full-auto' found, replace the retired flag with an explicit sandbox choice.

For persistent defaults, inspect configuration precedence before editing. A trusted project layer or launch flag can override a personal default; managed requirements still constrain the result. New permission profiles and legacy sandbox settings remain separate systems.

If your next task is to draft permission requirements for human review, inspect the linked guide’s setup, evidence and limits before using it.

For an MCP file access problem, first check Filesystem MCP's allowed directories. If the connection works but a tool call fails, use MCP Inspector to inspect the connection and call before changing permissions.

A video on C: keeps triggering access requests

If a video task keeps requesting access to C:, list the paths for the original clip, the intended output and any temporary files before changing the permission preset. A clip inside the workspace can still be processed by a command that writes elsewhere. Ask Codex to report the failing command and the exact path it needs; keep private usernames out of a shared error report.

Where the task allows it, work on a copy inside a dedicated project folder and explicitly choose an output folder there. Retry one read and one output operation, then inspect the resulting file. If the rejected path is already inside the intended scope, use the configuration and managed-policy checks below. Repeated prompts alone do not establish that the entire C: drive needs access. This is a diagnostic method, not a reproduced video-editing fix.

Choose a boundary before changing permissions

ControlQuestion to answerMinimum check
FolderIs the needed file in the selected workspace?Confirm its resolved path.
Sandbox / networkCan this task write or connect?Inspect the effective profile or legacy sandbox settings.
ApprovalsWho confirms an action?Check policy separately from filesystem access.
# Legacy sandbox configuration; do not combine with permission profiles
sandbox_mode = "workspace-write"
approval_policy = "on-request"

[sandbox_workspace_write]
network_access = false

Copy the check, then inspect the evidence

Record the client/version, effective config and exact denied action. For a legacy workspace-write setup, use the minimal example above; confirm an in-scope write with disposable files. Test a separate disposable folder outside the workspace and any configured writable roots. Record whether Codex asks for approval or blocks the write. Decline any approval prompt and verify the file stayed unchanged.

New to Codex? Start with the beginner guide.

Before changing an access boundary, back up your Codex configuration.

Before enabling full access, identify what needs to change

In the app, open the permission control beneath the composer. Full access is selectable only when both the interface and organizational policy offer it. Labels and available options can differ by client. The Windows documentation lists “Ask for approval” as an option with sandbox protection; managed policy can also make Full Access unavailable or reject it. See the app’s local sandbox and managed-environment verification.

The CLI command for a full-access launch is below; the documented alias is --yolo:

codex --dangerously-bypass-approvals-and-sandbox

This flag removes the local sandbox and approval prompts; OpenAI recommends it only in an externally isolated environment. It is not the default recommendation for ordinary project work, and it does not remove organization-managed restrictions. If you only need a second writable directory, check a precise grant such as --add-dir before removing every boundary. See the official CLI flags and security documentation.

The old --full-auto flag was removed in Codex CLI 0.147.0. The official release notes point to --sandbox workspace-write; it was never synonymous with full access.

Separate the four controls you are choosing

The sandbox defines technical boundaries for files and commands. The approval policy decides which actions need approval. The reviewer then decides whether an eligible approval request goes to you or to automatic review. These are distinct controls. Keeping human approval can still allow ordinary edits inside a workspace; removing prompts can still leave an action sandboxed. This distinction follows the approvals and sandbox documentation.

What you are choosingAsk firstEasy mistake
Folders and readsWhich files does this task need? Does it include sensitive material?A writable scope is not necessarily the entire readable scope.
Edits and commandsDoes the task need output files, or only reading and advice?“Workspace writable” can still protect particular paths.
Command networkingDoes this task genuinely need external access? Which source does it need?Command networking, web search, apps, MCP, and browsers are not one switch.
Approval and reviewerWhich actions will ask, and who reviews them?never only removes approval prompts; it does not enlarge permissions by itself.

The built-in :workspace profile can write to the current workspace root and the system temporary directory while protecting paths including .git, .agents, .codex, and .aws. Do not interpret “in the workspace” as “every location is directly writable.” Read scope depends on the effective profile or sandbox rules; it does not prove that every file outside the project is unreadable. See Permissions and protected paths.

Turning off command networking does not turn off web search, connectors, MCP, browser, or computer-use tools. If you enable command networking and intend to restrict domains, confirm that the matching network proxy is active; a domain name alone does not make all traffic controlled. See traffic outside the command proxy and network permissions.

Diagram: choose the work scope, then choose who confirms

Codex permission-choice diagram in Chinese: first select read-only or workspace writing according to the task, then separately select human or automatic review; full access removes the local sandbox and is not required merely to reduce prompts.

Gwarket’s original decision diagram, based on OpenAI documentation and dated November 5, 2026. The diagram’s Chinese labels distinguish “fewer prompts” from “accessing more places”; networking still requires a separate check.

If interruptions are the problem, adjust the approval workflow before widening the data scope. The same :workspace boundary can send eligible requests to you or to automatic review; changing the reviewer does not turn a workspace into the entire computer. With never, actions beyond the limit can fail rather than gain permissions automatically. This is task-selection guidance based on the division between approvals and automatic review.

A suitable setting is the smallest access scope needed to complete the result. Summarizing meeting notes usually needs only a copy of the material and an output folder. If a task suddenly asks for an entire home directory or company cloud account, first connect that additional access to the deliverable. This applies the least-privilege profile approach to everyday work; a file copy or a written instruction is not a technical permission lock.

Current commands: /permissions and /presets

Current official documentation says /permissions can open a menu and can directly specify a profile, approval policy, and reviewer:

/permissions :workspace --approval-policy=on-request --reviewer=user

Where the configuration allows it, this selects workspace permissions and sends approval requests to you. It uses the newer permission profiles, so first confirm that the active client supports them and that the organization permits the profile. The reviewer can be auto_review, but policy still applies. See the official /permissions syntax.

/presets is for reusing common content and settings, not for lifting restrictions. When it is open, press n to save a prompt or slash command, or press s to create a preset from the current model, permissions, terminal title, or status line, then apply it by number. Understand and verify permissions before saving a preset so an unsuitable scope is not repeated. See the official /presets documentation.

Use either new profiles or legacy sandbox settings

Profiles are currently marked beta. Built-in :read-only keeps local read-only restrictions; :workspace allows writes in the specified workspace and temporary scope; :danger-full-access removes local sandbox restrictions. The last name describes a boundary: it does not by itself describe every approval or connector behavior. Check the approval policy separately. See Permissions.

Profiles cannot be mixed with legacy sandbox_mode and sandbox_workspace_write. Normally, loaded sandbox_mode or the launch parameter --sandbox selects the legacy system. Managed allowed_permission_profiles is an exception that forces profiles. When an organization lists allowed profiles, an omitted built-in or custom profile can be rejected. See the official migration rules.

Where to inspect effective default permissions

In the CLI, use /status to inspect the current conversation settings and work scope; use /debug-config when you need to trace configuration sources. In the app, return to the permission control and the selected work folder. Do not inspect only the default you hope to write: personal settings, project settings, launch parameters, and organizational policy can all affect the final result. See the official command list and configuration precedence.

Personal configuration is commonly at ~/.codex/config.toml. A trusted project’s .codex/config.toml, a selected configuration profile, and launch parameters can override it. Managed requirements restrict the available scope; changing a personal setting cannot remove managed policy. A general configuration --profile is not the same thing as the permission profile discussed here. See configuration layers.

How to give Codex access to a specific folder

  1. Choose a workspace containing only public, synthetic, or non-sensitive copies.
  2. Decide whether the task is read-only or needs edits. In a CLI that supports the newer profiles, use the /permissions example above, then verify the effective settings.
  3. If the current client still uses legacy sandbox settings, use the documented one-time launch form below; do not layer it onto profiles.
codex --cd "./codex-practice" --sandbox workspace-write --ask-for-approval on-request -c approvals_reviewer=user

The practice folder must already exist. This example explicitly makes the reviewer human; on-request alone can inherit auto_review. It does not forcibly override command-network settings, so check the effective networking state separately. See CLI parameters, sandbox combinations, and configuration precedence.

On Windows, first identify whether Codex runs in native PowerShell or WSL2. They use different sandboxes, and their home and configuration locations can differ. Editing the other environment’s configuration does not configure the running client. See the Windows documentation. If a mode cannot be selected or an action is blocked, continue with permission-mode troubleshooting and address the applicable cause.

Check whether the setting fits this task

Complete the checklist below. Then, using a non-sensitive copy, ask Codex to create a three-line summary in the same folder and compare the result with the source and file changes. A successful edit proves that one change can complete; it does not prove that another folder, network setting, or tool has the same permission.

Workspace for this task:
Read-only, or edits needed:
Effective profile or sandbox:
Is command networking enabled:
Are web search / apps / MCP separately available:
Which actions will ask, and who reviews them:
For extra scope, the reason and exact location:
How to stop and recover if unclear:

If you only want to observe, use an available read-only setting. If that option does not exist, a written “do not edit” instruction is not a technical lock; verify policy or use a disposable copy. When a tool asks for a folder you did not originally select, an unexplained command, or a transfer of real work material to an external service, first establish what it will do, what data it touches, and why it needs it before deciding whether to allow it.

config.toml: choose one system

Personal configuration is commonly at ~/.codex/config.toml. Do not mix legacy sandbox settings with newer permission profiles. Normally, a loaded sandbox_mode or launch parameter --sandbox selects the legacy system; managed allowed_permission_profiles can force profiles, so use the configuration-precedence check above.

Legacy sandbox settings

For ordinary project editing that asks before going outside the scope:

sandbox_mode = "workspace-write"
approval_policy = "on-request"

The same setting with command networking enabled:

sandbox_mode = "workspace-write"
approval_policy = "on-request"

[sandbox_workspace_write] network_access = true

sandbox_mode = "danger-full-access" removes the sandbox; it does not automatically cancel the approval policy. Consider --dangerously-bypass-approvals-and-sandbox or --yolo only in an externally isolated environment whose loss you can tolerate.

Permission profiles (beta)

You can directly use a built-in profile:

default_permissions = ":workspace"

For a custom profile whose domain rules must actually be enforced by a proxy, enable the network proxy as well as network.enabled = true:

default_permissions = "project-edit"

[features] network_proxy = true

[permissions.project-edit] extends = ":workspace"

[permissions.project-edit.filesystem.":workspace_roots"] "**/*.env" = "deny"

[permissions.project-edit.network] enabled = true

[permissions.project-edit.network.domains] "api.openai.com" = "allow"

Full access not working? Check these first

What you seeCheck first
default_permissions has no effectUse /debug-config to look for sandbox_mode, a configuration profile, or --sandbox.
Full access cannot be selectedManaged policy may limit allowed_permission_profiles; personal configuration cannot override it.
Files are writable but networking failsCommand networking is separate; profile domain rules also need the network proxy.
Networked commands work but MCP or search does notEach tool has its own settings; do not substitute a wider sandbox for checking them.
An old tutorial’s --full-auto errorsIt was removed in Codex CLI 0.147.0; the release notes point to --sandbox workspace-write.

Use /status to inspect the effective state, then test a small task with a non-sensitive copy. Successfully changing one file does not mean other folders, networking, or tools have the same permissions.

Frequently asked questions

Can Ask for approval still allow workspace edits?

Yes. The effective sandbox or profile decides whether a location is writable; the approval policy decides when to ask. Automatic review changes the reviewer for eligible requests, not the sandbox boundary. Check /status and the current reviewer instead of relying on a menu label. See approval review.

Is never full access?

No. never disables approval prompts and still works within the existing boundary; actions beyond that boundary can fail. The full-access flag is what removes both the local sandbox and approval prompts. See runs without approval prompts.

Why is Full access missing?

The reason can be the client, execution environment, or managed requirement. Do not assume changing personal defaults or switching commands can override organizational policy. Use the permission-mode troubleshooting guide to identify the applicable cause.

Next steps

Codex series

Sources and verification date

Verified on November 5, 2026. The following official documentation describes behavior on that date; permission profiles are marked beta. The sources support command syntax, but do not establish that every command first shipped in October, so this guide makes no feature-first-release claim by month.

What we checked in this update

Windows, Codex CLI 0.169.0, November 16, 2026: local sandbox writes inside/outside the practice root and retired-flag parsing. App controls, managed policy, network isolation and model execution were not tested.