Windows config footgun: `:root` + `"." = "write"` resolves to the drive root instead of the workspace
What is the type of issue?
Documentation is confusing
What is the issue?
On Windows, a configuration like this can be interpreted much more broadly than a user may expect:
[permissions.<profile>.filesystem.":root"]
"." = "write"
I initially assumed this meant “write access to the current workspace directory”.
In practice, for a workspace located on E:\..., this ended up resolving to the drive root () rather than the repository root. That caused confusing sandbox startup failures that looked like runtime or ACL problems rather than a configuration semantics issue.
In my case, I observed failures such as:
- ACL-related setup failures on
E:\ - later, after partial config changes,
SetTokenInformation(TokenDefaultDacl) failed: 1344
After tracing the behavior and narrowing the config, the issue was resolved.
What fixed it
The correct configuration for workspace-local write access was:
[permissions.<profile>.filesystem.":workspace_roots"]
"." = "write"
I also removed an overly broad extra workspace root from the active profile.
After that:
- process launch worked
- Get-Location executed successfully
- a temporary file could be created and deleted inside the repo
- the process exited with code 0
Why I’m filing this as a docs issue
I’m not reporting this as a hard product bug.
This is a documentation/UX issue because the current semantics are easy to misread on Windows:
:root+"." = "write"can be understood as “current working directory”- but it effectively targets the filesystem/volume root for the current cwd
That makes the resulting failures difficult to diagnose.
Suggested documentation improvement
Please consider documenting explicitly that:
:rootrefers to the filesystem root / drive root- it should not be used when the intent is workspace-local write access
:workspace_rootsis the safer choice for repo-scoped write permissions
A validation warning for this pattern on Windows would also help in future versions, but the main issue here is that this behavior is subtle and easy to misunderstand from config alone.
Where did you find it?
I found it while using Codex on Windows and then traced the behavior through the Codex source code and local config.
Relevant areas:
- Codex config semantics for
:rootvs:workspace_roots - Windows sandbox startup behavior
- Permission profile configuration on Windows
I did not find an obvious documentation page clearly warning that :root with "." = "write" can resolve to the drive root on Windows.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗