Exact error
Match the message before using the fix
bwrap: Can't mkdir /tmp/codex-bwrap-synthetic-mount-targets-1000: Read-only file systemfailed to load AGENTS.md instructions for environment `local`: fs sandbox helper failedthread/start failed during TUI bootstrap (code -32603)Quick answer
Start here
Check the active managed permission profile before editing AGENTS.md. In the source reproduction, `:slash_tmp = "deny"` prevented bwrap from creating Codex's synthetic mount directory, so startup failed while loading instructions. If the policy is organization-managed, ask the administrator to provide the minimum temporary-directory access required by the supported sandbox; do not bypass the requirements file locally.
Diagnosis
Why it happens
- The source reproduction explicitly denies the `:slash_tmp` resource in the active profile.
- Codex's Linux sandbox needs to create a temporary synthetic mount directory before the session starts.
- The outer AGENTS.md message describes where startup stopped, not evidence that the instruction file is invalid.
Safest first
Fixes, in order
Confirm the managed-policy branch
Applies when: The exact path is `/tmp/codex-bwrap-synthetic-mount-targets-*`
A generic read-only filesystem can come from a container mount; this page is for the Codex requirements profile reproduction.
- Record the CLI version and full nested error.
- Ask the administrator which permission profile is active.
- Check whether that profile denies `:slash_tmp` while allowing only workspace roots.
- Do not copy private organization policy into a public issue.
Expected: The active profile explains why the sandbox cannot create its temporary mount directory.
Correct the policy at its owning layer
Applies when: An administrator confirms the active profile denies all of /tmp
Managed requirements are enforcement, so local overrides should not be used to evade them.
- Have the policy owner review the current Codex sandbox prerequisites and required temporary path behavior.
- Grant only the supported temporary-directory access needed by the sandbox, or update Codex if the policy should be supported without it.
- Restart the app-server so it reads the updated managed profile.
Expected: Codex can create its synthetic mount target while the rest of the managed boundary remains intact.
Separate container read-only mounts from policy denial
Applies when: No managed profile denies `:slash_tmp`
The same operating-system text can arise when `/tmp` itself is mounted read-only or unavailable.
- Run `findmnt /tmp` or inspect the container mount definition.
- Verify a normal user can create and remove a harmless temporary directory.
- If the host/container is the cause, correct that environment instead of changing Codex policy.
Expected: The remaining failure is correctly assigned to the host mount or Codex policy layer.
Verification
Prove the fix worked
- Start Codex and confirm it passes thread/start and AGENTS.md loading.
- Run a harmless workspace command under the intended permission profile.
- Verify the policy still denies unrelated paths it is meant to protect.
Escalation
If it still fails
- Do not delete AGENTS.md solely because the outer error mentions it.
- Do not switch to Full access to evade organization-managed requirements.
- Include the redacted profile name, Codex version, and exact temporary path in the upstream report.
Scope
Environment and version notes
- The documented reproduction appeared after upgrading to Codex 0.149.0.
- It used an active profile extending `:workspace` while denying `:slash_tmp`.
- The upstream issue was rechecked September 23, 2026.
Evidence
Sources
Source labels describe the evidence available on the checked date. A closed issue is not automatically a shipped fix.