Three sandbox_mode values produced three different permission profiles from codex debug prompt-input on Codex CLI 0.163.0. No login was required. The default block matched an explicit read-only block: a managed profile, a restricted filesystem, and one read entry for :root. workspace-write kept that read of :root, added write entries for the repository, :slash_tmp, and :tmpdir, and marked .git, .agents, .codex, and .aws read-only inside the repository. danger-full-access replaced the managed profile with type="disabled" and an unrestricted filesystem.
The mode name is not that block. workspace-write does not mean “the repository, and nothing else.” The prompt names two temporary roots. A later codex sandbox run with the same flag wrote a file in the repository and a file in /tmp, and it wrote a sibling of the repository because that sibling lived in the process TMPDIR. A directory outside the repository and outside TMPDIR was refused with Read-only file system. A write of .git/probe.txt was refused under workspace-write and succeeded under danger-full-access.
Read the profile the model is shown, then confirm one write. Do not stop at the flag.
What each block contained
The binary was Codex CLI 0.163.0, SHA-256 399ff69c431c066e40de318fba45c2b07f45a76b19939d247ee4828fc70c4215, on Linux x86_64, on 26 November 2026. CODEX_HOME was a new directory. No codex login was run. No model turn was started. The repository was a new git checkout with one empty commit. It held two skill files, one under .codex/skills and one under .agents/skills. The home held a third. Those files are how this run checked that the skill list did not change when the sandbox mode did. They are not a trust test.
Each codex debug prompt-input call exited 0 and returned five messages. The filesystem policy sat in one developer message, inside <environment_context>. The concatenated text of the default run was 10,738 characters. The explicit read-only run was the same length, and a field-by-field summary of the two JSON documents matched. workspace-write was 11,843 characters. danger-full-access was 10,697.
The default and read-only filesystem element was this, with the checkout path removed:
<filesystem>
<workspace_roots><root><repo></root></workspace_roots>
<permission_profile type="managed">
<file_system type="restricted">
<entry access="read"><special>:root</special></entry>
</file_system>
</permission_profile>
</filesystem>
workspace-write kept the :root read and added these entries, in this order:
<entry access="write"><path><repo></path></entry>
<entry access="write"><special>:slash_tmp</special></entry>
<entry access="write"><special>:tmpdir</special></entry>
<entry access="read"><path><repo>/.git</path></entry>
<entry access="read"><path><repo>/.agents</path></entry>
<entry access="read"><path><repo>/.codex</path></entry>
<entry access="read"><path><repo>/.aws</path></entry>
danger-full-access did not extend that list. It replaced it:
<permission_profile type="disabled">
<file_system type="unrestricted" />
</permission_profile>
The skill names in all four renders were the same seven: imagegen, openai-docs, skill-creator, skill-installer, and the three probe names. The marker sentences in the skill bodies were not in the JSON. This command lists skills. It does not load them. A change of sandbox_mode did not add or drop a name.
The permissions page, fetched the same night, says a profile that extends :workspace keeps .git/, .agents/, .codex/, and .aws/ read-only, and that :tmpdir and :slash_tmp are writable by default on that extension. It shows those facts as keys you write in config.toml. It does not show codex debug prompt-input, and it does not show the XML a given sandbox_mode renders. An earlier note on this site measured named profiles with codex sandbox --permission-profile and left :danger-full-access untested. The commands here are sandbox_mode on debug prompt-input and the same flag on codex sandbox.
Verification against the sandbox
codex sandbox was the check that the XML was not only a prompt. The same home and the same checkout were used. The helper warning on stderr said the binary would not create PATH aliases under the temporary directory that held CODEX_HOME. The mounts still applied. A missing alias line is not a missing sandbox.
Under sandbox_mode="workspace-write":
src/write.txtwas created. The file was 3 bytes..git/probe.txt,.codex/skills/probe-local/probe.txt,.aws/probe.txt, and.agents/skills/probe-agents/probe.txtwere not created. Each failure wasRead-only file system./tmp/codex-sbx-probe.txtwas created. The file was 6 bytes.- A sibling of the checkout, still under
TMPDIR, was created. - A directory outside the checkout and outside
TMPDIRwas not created. The error wasRead-only file system. The shell’s exit status was 0, because the next command in the samesh -cwrotesrc/again.txtand that command succeeded.
That last exit status is the trap. A script that chains a forbidden write and a permitted write, and then checks only $?, will record success. Split the probes, or require the forbidden path to be absent after the command. The stderr line is the evidence. The exit code of a compound shell is not.
Under an explicit read-only mode, and under codex sandbox with no sandbox_mode at all, src/ro.txt and src/default.txt were not created. Both errors were Read-only file system. Both commands exited 2. The default prompt matched read-only. The default sandbox matched it too, on this binary, for a write in the checkout. Do not assume an omitted flag means workspace-write.
Under sandbox_mode="danger-full-access", both .git/probe.txt and src/danger.txt were created. Each was 7 bytes. The command exited 0. The prompt had already said the profile was disabled and the filesystem was unrestricted. The write is the confirmation, not a surprise. An earlier note on this site refused to run that profile because an unrestricted profile cannot prove a deny. This run uses it for the opposite question: whether the disabled profile in the prompt is the profile the sandbox applies. On this binary, it is.
CODEX_HOME in this lab sat inside TMPDIR. A write to a file in that home therefore succeeded under workspace-write. That is the :tmpdir grant, not a separate grant for the Codex home. A home that lives outside TMPDIR was not the target of a dedicated denial test. Put the home outside the temp directory if the job must keep config, auth, and session files off the writable temp root. The prompt will not spell the home path. It spells :tmpdir.
The feature flag this view does not apply
The same debug command is a poor check for features.multi_agent. The config page says that flag enables subagent collaboration tools, that the default is true, and that setting the key to false disables a feature. codex features list --disable multi_agent printed multi_agent as stable and false. A config.toml with multi_agent = false produced the same line from features list.
codex debug prompt-input --disable multi_agent still contained <multi_agent_role> and the name spawn_agent. So did the run that read multi_agent = false from the config file. Both JSON documents were 10,738 characters, the same length as the default render. The documents contained five messages and no tool schema. The only content types were message and input_text.
The paragraph that remains is an instruction, not a tool list. It says earlier proactive-delegation text no longer applies, and that the model should not spawn a sub-agent unless the user or an applicable instruction asks for one. It still names spawn_agent, followup_task, send_message, wait_agent, interrupt_agent, and list_agents. Because this command does not emit tools, a stable paragraph does not prove the tools are still registered, and a false feature flag does not prove the paragraph is gone. Use features list for the flag. Use a signed-in session, which this run did not start, if you need the tool list. Do not use the debug prompt as either check.
Read the profile, then one write
From a disposable CODEX_HOME and a disposable checkout, render the profile before you leave a mode in a job:
CODEX_HOME=<codex-home> codex debug prompt-input \
-c 'sandbox_mode="workspace-write"' \
-- 'profile check'
Search the JSON for permission_profile. On 0.163.0 you should see type="managed", a write path for the checkout, write specials :slash_tmp and :tmpdir, and read paths for .git, .agents, .codex, and .aws. If the job is supposed to be read-only, omit the flag or set read-only, and require the single :root read. If the job is supposed to be unrestricted, require type="disabled" and then decide whether that is actually what you want. A missing permission_profile element means you are not looking at the block this run used.
Then run one write per claim, as its own command:
CODEX_HOME=<codex-home> codex sandbox \
-c 'sandbox_mode="workspace-write"' \
-- /bin/sh -c 'echo ok > <repo>/src/probe.txt'
Repeat for /tmp, for a path under TMPDIR that is not the checkout, for a path outside both, and for <repo>/.git/probe.txt. The first three should create a file on this binary. The last two should print Read-only file system and leave the path absent. Run the .git write again with danger-full-access only if you intend to confirm the disabled profile, and only in a checkout you can throw away. That mode wrote the git file here. It is not a deny test.
The release page fetched the same night lists Codex CLI 0.172.0, dated 24 November 2026, above this binary. This run did not take that update. The notes above are 0.163.0 only. A newer binary can change the XML, the default mode, or the temp specials. Render the profile on the binary the job will run.
Sources
- Codex CLI 0.163.0,
codex --version, Linux x86_64, 26 November 2026. SHA-256399ff69c431c066e40de318fba45c2b07f45a76b19939d247ee4828fc70c4215. IsolatedCODEX_HOME. No login.codex debug prompt-inputrendered the three profiles above.codex sandboxconfirmed the writes and the refusals. - Permissions, read 26 November 2026. A profile that extends
:workspacekeeps.git/,.agents/,.codex/, and.aws/read-only.:tmpdirand:slash_tmpare writable by default on that extension. - Config basics, read 26 November 2026.
features.multi_agentdefaults to true and enables subagent collaboration tools. Set the key to false to disable a feature. - Codex CLI 0.172.0 release, published 24 November 2026. This run stayed on 0.163.0.
- Earlier measurement of named profiles, which left
:danger-full-accessuntested: Check a Codex permission profile before the allowlist is trusted