You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex prompts per-file permission when worktree differs from opened folder #13394
When Codex creates a worktree that doesn't match the currently opened folder, it attempts to edit files outside the sandbox. This results in a permission prompt for every single file edit.
Switching to the correct folder to resolve this isn't a viable workaround either — doing so breaks the current thread, and there's no way to move or resume it in the new context.
I understand this is expected to an extent, but it renders the models ability to switch worktrees as needed significantly less useful.
What steps can reproduce the bug?
Open a folder in Codex
Let Codex create a worktree that differs from the opened folder
Observe per-file permission prompts for each edit
Attempt to switch to the worktree folder — thread is lost and cannot be resumed
What is the expected behavior?
Target behaviour:
If the thread switches worktrees, then Codex can mark the chat as a new worktree, similar to starting a new thread on a new worktree... this way it's consistent and you don't end up with a mismatch between the tread default and worktree codex is working on.
OR
A dropdown menu next to the branch selector (at the bottom of the UI) that allows switching the active worktree without losing the current thread. This ties into the previously suggested feature for worktree switching.
Additional information
I understand this is expected to an extent, but it renders the models ability to switch worktrees as needed significantly less useful.
Overall, I believe the permissions needs a deeper look and plan so it's managed more seamlessly, especially on the Mac app.
Activity