Skip to content

Incorrect warning "The model wants to edit files outside of your workspace" (if using symlinks?) #289094

Closed

Description

Copilot Chat Extension Version: 0.37.2026012002
Version: 1.109.0-insider (user setup)
Commit: acc954b
Date: 2026-01-20T05:02:21.248Z
Electron: 39.2.7
ElectronBuildId: 13098910
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.22631

  1. Ask for changes in the workspace
  2. Notice how on each existing file change, the chat will prompt with this warning:

    Allow edits to sensitive files?
    The model wants to edit files outside of your workspace (create-vscode-directory-structure.bat). Do you want to allow this?

The file is clearly in the workspace folder.

Actually this seems to be a similar issue as already described in #276392 but in my case all folders in my workspace are symbolic links on Windows. If I open the directory directly and force the agent to edit the file it works without prompting. So it seems the problem still exists for symbolic links. But I'm pretty sure it worked a while ago but I cannot say exactly when the behavior changed.

So probably my first question would be, is it supposed to work for symbolic links?

Best regards,
Andreas

Activity

  1. added
    chat-ext-issue
    on Jan 20, 2026
  2. removed
    chat-ext-issue
    on Jan 20, 2026
  3. added
    bug
    on Jan 23, 2026
  4. conjuncts commented on Feb 5, 2026

    @conjuncts

    I concur. In my case, I am working with the Remote SSH extension in a HPC where all the directories are symlinks. I only noticed this starting 1.109.0, but I failed to retroactively bisect a version without this problem.

  5. byron-hawkins commented on Nov 8, 2026

    @byron-hawkins

    I’m seeing the same issue, specifically with writes: reads through the symlinked workspace folders work, but when the agent tries to edit a file that is visibly inside the workspace, VS Code warns that it is outside the workspace and blocks the write. The workspace contains directories symlinked to their real locations outside the workspace root.

    The problem is not that the target is unreadable; it’s that the write permission check appears to treat the symlink target as outside the workspace, even though the file is accessed through a directory included in the workspace.

    Expected behavior: writes through a workspace symlink should be treated as writes to files in that workspace, subject to the normal workspace permission policy. The user chose the symlink layout, so VS Code should not silently redefine that workspace boundary based on the resolved target path. Could you clarify whether this is fixed in a current release, and what workaround is recommended?

  6. connor4312 commented on Nov 9, 2026

    @connor4312
    Member

    Should be fixed on the latest Insiders.

    it’s that the write permission check appears to treat the symlink target as outside the workspace

    This is very intentional and required for security. See: many recent CVE's.

  7. added this to the 1.147.0 milestone on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions