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
VSCode Codex doesn't respect sandbox_workspace_write.writable_roots in config.toml #8029
For any git operation I need to perform in project-worktree1, it needs to modify the main git repo ../project/.git/worktrees/project-worktree1/index. codex sandbox doesn't allow this so I have to whitelist .../project/.git to get this work.
This works in codex cli because cli includes both sandbox_workspace_write.writable_roots and the current working directory instead of overwriting it. However, this doesn't work in vscode-codex since it only includes the current working directory. I believe the cli behavior is correct where the current working directory should be appended to writable_roots instead of overriding writable_roots.
Fwiw, you also have this type of issue in non-git-worktree use case if you ever want to modify any file in a folder outside the workspace (e.g. a special tmp dir, some configuration dir, and etc)
Finally, I'd argue that the docs https://developers.openai.com/codex/local-config/ says additional writable roots so vscode-codex shouldn't override it. If you do still believe the current behavior is correct, I'd like to know how to handle the git worktree use case as I described above.
nvm - I found this #5041. I was just under the impression that vscode-codex reads ~/.codex/config.toml similar to many other users in that thread. The custom mode works for me. It would be nice if you can add that custom mode to the documentation here https://developers.openai.com/codex/ide
Activity
gpeal commentedon Dec 16, 2025
This is correct, the extension users your open workspace folders as writable roots
yiteng-guo commentedon Dec 16, 2025
hi, I should add a bit more context here. I have git worktree setup such that
For any git operation I need to perform in
project-worktree1, it needs to modify the main git repo../project/.git/worktrees/project-worktree1/index. codex sandbox doesn't allow this so I have to whitelist.../project/.gitto get this work.This works in codex cli because cli includes both
sandbox_workspace_write.writable_rootsand the current working directory instead ofoverwritingit. However, this doesn't work in vscode-codex since it only includes the current working directory. I believe the cli behavior is correct where the current working directory should be appended towritable_rootsinstead of overridingwritable_roots.Fwiw, you also have this type of issue in non-git-worktree use case if you ever want to modify any file in a folder outside the workspace (e.g. a special tmp dir, some configuration dir, and etc)
Finally, I'd argue that the docs https://developers.openai.com/codex/local-config/ says additional writable roots so vscode-codex shouldn't override it. If you do still believe the current behavior is correct, I'd like to know how to handle the git worktree use case as I described above.
gpeal commentedon Dec 16, 2025
Thanks for the additional info, I'll take this back to the team for further discussion.
yiteng-guo commentedon Dec 16, 2025
nvm - I found this #5041. I was just under the impression that vscode-codex reads
~/.codex/config.tomlsimilar to many other users in that thread. The custom mode works for me. It would be nice if you can add that custom mode to the documentation here https://developers.openai.com/codex/ide