Skip to content

Codex Desktop on WSL: apply_patch always requests approval in writable workspace, while normal shell writes do not #18365

Description

@eschulma

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

26.415.20818

What subscription do you have?

Pro $200

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

The issue began after the latest app update. It includes desktop runtime codex-cli 0.122.0-alpha.1

  • apply_patch always triggers the approval flow, even for tiny writes in the current writable workspace like Playground, or in git-controlled repos. This did not happen before.
  • The session logs show those attempts ending as patch_apply_end with status:"declined" and stderr:"patch rejected by user".
  • Ordinary shell writes in the same workspace succeeded without approval. I created shell_write_probe.txt directly with touch, and that worked.

What steps can reproduce the bug?

Uploaded thread: 019d9c61-6002-79a1-b36b-6459c0afa675

Ask the agent to edit a file within a Git-repo. It will attempt to use apply_patch and ask you for permissions, even though permissions are configured to allow edits. Other edit tools work fine.

What is the expected behavior?

apply_patch works without asking for permission.

Additional information

Here is my config.toml that is active. However switching to default permissions did not fix this problem either. Nor did changing the windows sandbox values.

#:schema https://developers.openai.com/codex/config-schema.json
model = "gpt-5.4"
model_reasoning_effort = "high"
personality = "pragmatic"

full-auto mode

approval_policy = "on-request"
sandbox_mode = "workspace-write"

file_opener = "vscode"
plan_mode_reasoning_effort = "high"

[features]
unified_exec = true
shell_snapshot = true
undo = true
prevent_idle_sleep = true
multi_agent = true

[shell_environment_policy]
inherit = "all"
ignore_default_excludes = true

Allow the agent to use the network when running in your workspace

[sandbox_workspace_write]
network_access = true
writable_roots = [ "/home/ekane/.m2", "/mnt/c/Users/eschu/.codex/skills/playwright-skill",
"/home/ekane/src/github.com/sentrylink/webapp", "/home/ekane/src/github.com/sentrylink/terraform",
"/home/ekane/src/github.com/sentrylink/sysadmin", "/tmp" ]

[tui]
notifications = true
status_line = ["model-with-reasoning", "current-dir", "git-branch"]

[history]
persistence = "save-all"
max_bytes = 104857600 # 100 MB

[projects."/home/ekane/src/github.com"]
trust_level = "trusted"

[projects."/home/ekane/src/github.com/sentrylink/webapp"]
trust_level = "trusted"

[projects."/home/ekane/src/github.com/sentrylink/batchjobs"]
trust_level = "trusted"

[projects."/home/ekane/src/github.com/novalabs/NovaPassServer"]
trust_level = "trusted"

[projects."/home/ekane/src/github.com/sentrylink/terraform"]
trust_level = "trusted"

[projects."/home/ekane/src/github.com/sentrylink/sysadmin"]
trust_level = "trusted"

[projects."/home/ekane"]
trust_level = "trusted"

[projects."/mnt/c/Users/eschu/OneDrive/Documents/Playground"]
trust_level = "trusted"

[plugins."google-calendar@openai-curated"]
enabled = true

[plugins."gmail@openai-curated"]
enabled = true

[plugins."github@openai-curated"]
enabled = true

[plugins."google-drive@openai-curated"]
enabled = true

[windows]
sandbox = "unelevated"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions