Codex Desktop secondary folder is not propagated to workspace_roots or writable permissions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- git, macos, rust
- Domain
- authorization, desktop, security
Research direction
No source files or tests are named. Start by tracing how the Desktop secondary-folder state is carried into the next task turn, comparing the injected environment_context.workspace_roots with permission_profile.file_system. Done means an attached writable folder appears in both contexts and writes no longer require repeated approval without recreating the task.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using?
26.721.41059 (build 5848)
What platform is your computer?
macOS 26.2, arm64
What issue are you seeing?
A folder added through the Codex Desktop UI as a secondary folder for an existing task is displayed as attached in the app, but it is not propagated to the task's effective sandbox context.
The secondary folder is absent from both:
environment_context.filesystem.workspace_roots- writable entries in
permission_profile.file_system
The agent can inspect/read the sibling worktree, but writes fail with Operation not permitted and require out-of-sandbox approval. This produces repeated permission prompts even though the folder was already added through the app UI for that task.
Sanitized example of the injected context:
cwd: /path/project.worktrees/PRIMARY
workspace_roots:
- /path/project.worktrees/PRIMARY
# /path/project.worktrees/SECONDARY is missing
permission_profile:
file_system:
entries:
- access: write
path: /path/project.worktrees/PRIMARY
# no entry for SECONDARY
A write into the secondary worktree then fails:
cp: /path/project.worktrees/SECONDARY/...: Operation not permitted
This appears to be a synchronization bug between the secondary-folder state shown by the Desktop UI and the permission/workspace state injected into an already-running task.
What steps can reproduce the bug?
- Open an existing Codex Desktop task whose primary folder is a Git repository or worktree.
- Create or select a sibling Git worktree outside the primary folder.
- Add that sibling worktree to the task using the Desktop app's secondary-folder UI.
- Confirm that the app shows the secondary folder as attached.
- Continue the same task and ask Codex to create or copy a file inside the secondary worktree.
- Observe an approval prompt or an
Operation not permittedfailure. - Inspect the next turn's
environment_context. - Observe that the secondary folder is absent from
workspace_rootsand from the writable permission entries.
The problem persists across subsequent turns in the same task.
What is the expected behavior?
Once a secondary folder is attached to a task with write access:
- it should be included in the task's
workspace_roots; - it should receive the corresponding writable permission entry;
- ordinary writes inside it should not require repeated escalation;
- the effective permissions should update in the existing task without requiring the task to be recreated.
If secondary folders are intentionally read-only, they should still appear in the injected roots/permission context and the UI should clearly communicate that limitation.
Additional information
Related but distinct reports:
- #6542 covered secondary folders in a VS Code multi-root workspace and was closed when multi-root was not supported.
- #27943 requests multiple workspace folders in the Desktop app. In this Codex App version, the UI already exposes a secondary-folder control; this report concerns the control not updating the effective sandbox permissions.
- #33322 describes an existing task losing write permissions after a model switch. This report does not involve a model switch: only adding a secondary folder to the current task.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·