Skip to content

Agent mode requests unnecessary approval for edits inside secondary workspace folders #6542

Closed as duplicate

Description

@ivangonzalezg

What version of the VS Code extension are you using?

0.4.39

What subscription do you have?

ChatGPT Plus

Which IDE are you using?

VS Code

What platform is your computer?

Darwin 25.1.0 x86_64 i386

What issue are you seeing?

When using Codex in Agent mode within a multi-root Workspace, the extension incorrectly asks for approval to apply edits (showing the “Allow once / Allow this session / Reject” dialog) — even though the files being modified are inside folders that are part of the Workspace.

Image

This happens even though Agent mode is supposed to allow automatic edits within the entire workspace, according to the extension’s description.

What steps can reproduce the bug?

  1. Create a multi-root Workspace in VS Code (with at least two folders added).
  2. Open the Codex extension and select Agent mode.
  3. Ask Codex to edit a file located in any folder other than the first one in the Workspace.
  4. Codex will attempt to apply the edit but display a prompt asking for approval (“Allow once / Allow this session / Reject”).
  5. Now ask Codex to edit a file from the first folder in the Workspace — it will edit it directly without requesting approval.

What is the expected behavior?

When in Agent mode, Codex should:

  • Be able to read and edit files in all folders included in the Workspace.
  • Not require approval for edits performed within the Workspace boundaries.
  • Request approval only for:
    • Files located outside the Workspace
    • Network access or external command execution

Additional information

The issue seems related to how Codex determines the working directory in multi-root Workspaces — it appears to only recognize the first folder as the valid working path.

The problem does not occur in single-folder projects.

Activity

  1. added
    extension
    on Nov 12, 2025
  2. added
    bug
    sandbox
    on Nov 12, 2025
  3. etraut-openai commented on Nov 12, 2025

    @etraut-openai
    Contributor

    Thanks for the bug report. Codex currently doesn't have support for multi-root workspaces. If you'd like to see this added, please upvote #2909 (i.e. add a thumbs-up reaction). We generally use upvotes to prioritize feature work.

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

    bugextensionsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions