[App][macOS] Full Access compiles contradictory root write + deny rules; AGENTS.md startup fails with EPERM
What version of the Codex App are you using?
ChatGPT desktop app 26.903.61454 (build 8378), bundled codex-cli 0.153.4.
What subscription do you have?
Paid personal ChatGPT workspace.
What platform is your computer?
macOS 26.6.2 (build 25G83), Apple Silicon.
What issue are you seeing?
Selecting Full Access in the desktop app can produce an effective managed filesystem profile containing contradictory rules for the same workspace root: first write, then deny. The deny wins, so thread startup fails while trying to read a normal, readable project AGENTS.md:
failed to load AGENTS.md instructions for environment `local`: Operation not permitted (os error 1)
This is not a macOS file-permission problem. The file exists, is mode 0644, is readable outside the failed task, and the repository is trusted. The task rollout records the UI-selected profile as :danger-full-access, but the compiled environment profile is managed/restricted and contains both of these entries for the same special root:
{"path":{"type":"special","value":{"kind":"root"}},"access":"write"}
{"path":{"type":"special","value":{"kind":"root"}},"access":"deny"}
The only intended deny rules visible alongside these were .env protections. A custom profile with explicit workspace roots allowed the task to start, which further isolates this to effective-profile compilation/state rather than the file itself.
What steps can reproduce the bug?
- In the macOS desktop app, open a trusted local project that contains a readable
AGENTS.md. - Use a multi-folder local environment/workspace.
- Select Full Access for the task.
- Start a task or restart a turn so the environment is initialized and project instructions are loaded.
- Observe that startup can fail before the first model turn with the
AGENTS.mdEPERM above. - Inspect the task rollout/effective permissions: the selected profile is
:danger-full-access, while the compiled managed profile contains both rootwriteand rootdeny.
What is the expected behavior?
Full Access should compile to an effective profile that can read the trusted workspace's AGENTS.md. A root deny must not be introduced for the same root that Full Access grants. If a managed policy overrides Full Access, the UI and error should identify the overriding policy and its provenance instead of presenting Full Access as active.
Additional information
The failure reproduced twice on September 10, 2026:
2026-09-10T17:36:22.134Z, task01a08939-98be-7e61-a365-3eafb05079c4, turn01a08c64-59d8-72b1-b8a7-c3f012e784452026-09-10T17:59:07.553Z, task01a08c36-04e3-7f73-a9ff-db04f8dbc0be, turn01a08c79-2f8b-72f2-8773-bc1d652f2193
Related but distinct: #40937 covers an intentionally restricted custom profile whose read roots exclude the workspace. This report concerns Full Access being selected while the generated effective profile denies the workspace root.
No raw logs, repository contents, account identifiers, or credentials are included in this public report.
Additional macOS reproduction with accepted Full access and a proxy refresh error
I see the same AGENTS.md startup error after selecting Full access on a newer desktop build. The failed turn requests contain the Full access settings. The logs also show a rejected SOCKS proxy update immediately before the instruction-loading failure.
I have not confirmed the contradictory compiled root rules described in the issue body, so I cannot establish that this is the same underlying defect.
Environment
- ChatGPT/Codex desktop app:
26.1007.21159, build20052. - Bundled CLI:
codex-cli 0.162.0-alpha.17.2, verified with the bundled executable's--version. - macOS:
26.7.1, build25G241. uname -mprs:Darwin 25.6.0 arm64 arm.- Existing local chats in the same trusted repository, with multiple workspace roots.
- The failing chat's named profile inherits
network.enable_socks5 = false. The project configuration has no network override.
Observed sequence
This is a repeated failure in an existing chat, not yet a standalone minimal reproducer.
- Open the existing chat with its named permission profile selected.
- Select Full access and submit a prompt.
- The turn fails while loading instructions, before assistant tools run.
- After fully quitting and reopening the app, repeat the Full access selection and submission. The same errors recur.
The app quit/reopen is user-reported. The second failed submission and its settings are recorded in the logs. Cold startup with Full access already saved, without switching profiles after startup, has not been tested.
Actual and expected behavior
The failed turn requests carry these settings:
permission_profile: Disabled
active_permission_profile.id: :danger-full-access
approval_policy: Never
The settings were accepted; this is not a report based only on the picker label. These request fields do not establish which filesystem rules the instruction-loading helper ultimately enforced.
The failing chat logs this error when Full access is selected:
failed to refresh managed network proxy for sandbox change: failed to update network proxy state: cannot update network.enable_socks5 on a running proxy
The next submitted turn fails with:
failed to load AGENTS.md instructions for environment `local`: Operation not permitted (os error 1)
Expected: selecting an allowed Full access profile should leave the chat able to load readable project instructions and start a turn. If a runtime transition cannot be applied, the app should report the failed transition and the effective settings.
Comparison and timing
On 9 October 2026, both chats were handled by the same app-server process:
| UTC | Observation |
|---|---|
| 18:43:45 | Another existing chat in the same repository successfully submits a Full access turn. |
| 18:44:09 | The failing chat accepts Full access and logs the SOCKS proxy refresh error. |
| 18:44:12 | Its submitted turn fails to load AGENTS.md. |
Both requests have the Full access fields shown above. No matching proxy refresh error was found for the working chat in that day's scoped logs.
The global and project AGENTS.md files are directly readable after returning the failing chat to its named profile. The chats' workspace roots match apart from their own visualization directories. Both visualization directories were checked: ordinary directories, no symlink, AGENTS.md, AGENTS.override.md, or local config file.
Related evidence and limits
PR #17040 introduced in-place proxy refresh and explicitly rejects listener/SOCKS changes that cannot be hot-reloaded. Issue #44357 reports a related named-profile-to-Full-access proxy transition, but its observable failure is HTTP 403 after losing domain rules.
The SOCKS refresh error and AGENTS.md failure are correlated here. Their causal connection remains unproven, and there is no verified Full access workaround for this chat.
Does this look like another manifestation of #44605, or should the SOCKS transition failure be tracked separately?
The excerpts omit private paths, repository contents, credentials, and conversation content.
I reproduced this on macOS with the desktop-bundled codex-cli 0.167.0-alpha.4.1 on 2026-11-14. Repeated turn-start attempts failed with the same AGENTS.md EPERM. Returning to the configured named profile allowed the next turn to start.
The saved settings identify a specific transition problem. The source locations below are pinned to the matching release tag.
For this description, <workspace-profile> means the existing named profile and <workspace> means its project directory. These are placeholders.
The relevant shape of the working profile is:
# Relevant entries only, not a standalone reproducer.
[permissions."<workspace-profile>".filesystem]
":root" = "deny"
":minimal" = "read"
"<workspace>" = "write"
# Other explicit allowances and private-path denials omitted.
After selecting Full access, the incoming request correctly carries PermissionProfile::Disabled and the selected ID :danger-full-access. However, the subsequent thread_settings_applied record contains a concrete managed / restricted profile with:
[
{"path":{"type":"special","value":{"kind":"root"}},"access":"write"},
{"path":{"type":"special","value":{"kind":"root"}},"access":"deny"}
]
Those are excerpts from the effective policy. The complete entry list contains root write plus the previous denials, with no specific workspace or runtime allowances. The named profile's explicit read/write allowances are absent.
The matching source explains the result:
SessionConfiguration::apply()passes the current filesystem policy intoset_permission_profile_projection().set_permission_profile_projection()unconditionally callspreserve_deny_read_restrictions_from()when that previous policy is supplied.preserve_deny_read_restrictions_from()converts the unrestricted replacement into a restricted root-write policy and appends the previous denials, including the blanket root denial. It does not retain the previous specific allowances.- The documented equal-specificity precedence is
deny > write > read, so the retained root denial defeats the new root-write grant.
Replaying that deny-preservation algorithm in memory against the captured pre-switch entry list reproduced the complete saved post-switch entry list, including its order and the retained glob-depth setting. This was a reconstruction of recorded policy data; no separate minimal workspace or patched Codex build was tested.
There is also an apparent inconsistency with the ordinary configuration path: permission_profile_preserving_managed_denied_reads() explicitly returns without preserving those denials for DangerFullAccess and ExternalSandbox. The live session transition above has no equivalent exemption.
The existing named profile remains usable because its specific workspace and runtime allowances coexist with its default root denial. Selecting Full access drops those allowances while retaining that denial. The failure occurs during instruction loading, before model tools execute. The available logs do not identify the first denied syscall.
This points to the live profile-transition logic as the place to investigate. No raw logs, local paths, profile names, thread IDs, repository contents, or credentials are included here.
Still reproducible on desktop 26.1120.50957 (build 30866) with bundled codex-cli 0.171.0-alpha.13.2, on macOS 27.2.1 (26B131), Apple Silicon.
In an existing Local chat, a named profile with ":root" = "deny" and explicit workspace grants completed turns successfully. After switching that same chat to Full Access, the next turn failed before model execution.
failed to load AGENTS.md instructions for environment `local`: Operation not permitted (os error 1)
The failed turn requested the disabled profile. The saved effective policy had a root write grant and the previous deny rules, including the root deny. The workspace grants from the named profile were absent. A fresh chat in the same repository started successfully with Full Access.
A read-only replay against the bundled exec-server isolated the first failing call to fs/getMetadata on the repository's AGENTS.md. The previous working policy passed. Root write plus root deny were sufficient to reproduce the error. Removing only the root deny from the replay made the metadata call pass with all 60 other deny rules intact.