Shell write denied inside workspace without auto-escalation

Open 💬 1 comment Opened Jun 12, 2026 by wangyauneli

Description
When a shell command tries to write a file inside the workspace directory and gets \Access denied\, the sandbox does not auto-escalate or offer to escalate. The agent retries the same operation endlessly with different approaches, wasting time and confusing the user.

Steps to reproduce

  1. Open a project in Codex desktop app
  2. Have a file that is writable by the current OS user but the sandbox shell process lacks write permission
  3. Ask the agent to modify that file
  4. The agent tries multiple approaches (apply_patch, Set-Content, WriteAllBytes, Out-File, git apply...) all failing with \Access denied\

Expected behavior
When a write to a workspace-internal path is denied, the tool should either:

  1. Auto-escalate to unrestricted mode and retry, or
  2. Clearly inform the user that sandbox permission is insufficient and ask whether to escalate

Impact
Users see the agent repeatedly fail to edit their own project files with no clear explanation. The user can edit the same file in any text editor without issues, making the Codex experience frustrating and confusing. This defeats the purpose of having an AI coding assistant that is supposed to modify project files.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗