Skip to content

Remove-Item fails with Full access while .NET deletion succeeds #35903

Description

@AMD4x

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

26.721.41059

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Windows 11 x64 — Microsoft Windows NT 10.0.26200.0

What issue are you seeing?

With "Full access" enabled, Codex failed to delete an empty folder using PowerShell Remove-Item and reported that delete commands outside the active workspace were blocked, even though no project or workspace was selected.

I started a new chat without selecting a project or workspace and asked Codex to delete this empty folder:

C:\Users\AMD4x\Desktop\New folder

The initial deletion attempt using Remove-Item failed, and Codex responded:

"I couldn’t remove the folder because this environment blocks delete commands outside the active workspace."

In the same chat, I then asked Codex to delete the same folder using the .NET Directory API. The deletion succeeded.

This suggests inconsistent command handling with Full access enabled: the PowerShell Remove-Item attempt failed, while System.IO.Directory.Delete successfully deleted the same folder in the same session.

Codex showing Remove-Item failure followed by successful .NET Directory API deletion

What steps can reproduce the bug?

  1. Open the Codex desktop app on Windows.
  2. Start a new chat without selecting a project or workspace.
  3. Select "Full access" from the permissions control.
  4. Create an empty folder outside any selected workspace, for example:

C:\Users<username>\Desktop\CodexTestFolder

  1. Ask Codex to delete the folder without specifying a deletion method.
  2. Codex attempts the deletion using PowerShell Remove-Item, but the operation fails. It then reports that delete commands outside the active workspace are blocked, even though no workspace is selected.
  3. In the same chat, ask Codex to delete the same folder using the .NET Directory API.
  4. The .NET deletion succeeds.
  5. Confirm that "Full access" remains enabled throughout the test.

What is the expected behavior?

With "Full access" enabled and a clear, narrowly scoped deletion request, Codex should complete the operation through its normal deletion workflow without requiring the user to specify an alternative API.

If Remove-Item was restricted because the model previously performed overly broad or unsafe deletions, the preferred solution is to improve the model's deletion judgment and safeguards—such as validating the exact target, limiting the deletion scope, avoiding broad recursive patterns, and requesting confirmation when appropriate—then restore reliable use of the standard deletion method.

The successful .NET deletion demonstrates that the requested operation was permitted and technically possible. It should not result in restricting the .NET API as well; instead, Codex's default deletion behavior should be made both safe and functional.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool callingwindows-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