Skip to content

Windows app cannot perform git operations when sandbox settings are set to "Workspace write" #16794

Closed as duplicate

Description

@Lightborne

What version of the Codex App are you using (From “About Codex” dialog)?

26.325.31654

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

If I set sandbox settings to "Workspace write", the agent cannot perform any git operations in my local repo. All commands come back with

fatal: Unable to create '<path>/.git/index.lock': Permission denied

What steps can reproduce the bug?

set sandbox settings to "Workspace write" and set up the agent sandbox. This is the config.toml it wrote for me:

model = "gpt-5.4"
model_reasoning_effort = "xhigh"
sandbox_mode = "workspace-write"
approval_policy = "never"
network_access = true

[windows]
sandbox = "elevated"

Then ask the agent to perform a git operation like

git commit -m "test" --dry-run

It fails with the error mentioned above.

What is the expected behavior?

It should be able to perform git operations.

Additional information

I need to set Sandbox Settings to "Full Access" to get it to be able to do stuff with git in my local workspace.

Activity

  1. added
    app
    on Apr 4, 2026
  2. added
    bug
    windows-os
    sandbox
    on Apr 4, 2026
  3. Lightborne commented on Apr 4, 2026

    @Lightborne
    Author

    The other issues are centered around the Codex CLI - mine is the windows app.

  4. etraut-openai commented on Apr 4, 2026

    @etraut-openai
    Contributor

    The app uses the CLI under the covers, so this is the same issue as #15505.

  5. Lightborne commented on Apr 4, 2026

    @Lightborne
    Author

    Added this comment to #15505 as well:

    I modified my app's config.toml to try to use the workaround:

    model = "gpt-5.4"
    model_reasoning_effort = "xhigh"
    sandbox_mode = "workspace-write"
    approval_policy = "never"
    network_access = true
    
    [windows]
    sandbox = "elevated"
    
    sandbox_workspace_write.writable_roots = ["C:\\<path>\\.git"]
    

    The agent still can't write to .git:

    Same result again:

    git commit -m "test" --dry-run
    fatal: Unable to create 'C://.git/index.lock': Permission denied

    Nothing changed on this attempt.

  6. hassanp50287 commented on May 21, 2026

    @hassanp50287
  7. hassanp50287 commented on May 21, 2026

    @hassanp50287
  8. hassanp50287 commented on May 21, 2026

    @hassanp50287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions