Skip to content

Always asked to trust folder when switching folders on the same Coder workspace #850

Description

@kcon-stackav

I'm using version 1.13.2 of the Coder VS Code extension in VS Code Version: 1.112.0 (Universal) on macOS 26.3.1 (25D2128) to connect to a remote Coder workspace running Ubuntu 22.04 at time of writing.

I consistently see this prompt every time I switch which folder VS Code has opened on my Coder workspace (e.g. using the File: Open Recent... command in VS Code's command palette):

Image

Do you trust the authors of the files in this folder?

Creating a terminal process requires executing code

If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious. See our docs to learn more.

Even though I've always clicked the "Trust Folder & Continue" button there, I continue to see the same prompt when switching to open the same folders on the same Coder workspace.

I searched for an existing issue and saw #83 but that seems like it might not be the same issue since #83 would stop prompting you after you trusted a given folder on a given Coder workspace at least once.

Any ideas on how I can avoid this prompt or if there is anything that could be changed in the Coder VS Code extension to solve it?

Activity

  1. self-assigned this
    on Mar 30, 2026
  2. EhabY commented on Mar 30, 2026

    @EhabY
    Collaborator

    This is an upstream VS Code bug, workspace trust decisions don't persist for Remote SSH connections. When you switch folders (which reloads the window), VS Code loses the trust state and asks again. It's tracked at microsoft/vscode#289835.

    We looked into fixing this on our side but unfortunately can't. The workspace trust system is internal to VS Code with no extension API to grant trust programmatically. The one mechanism that would work (the isTrusted flag in the remote authority resolver) belongs to the Remote SSH extension, not us.

    Workaround: disable workspace trust in your VS Code settings:

    {
        "security.workspace.trust.enabled": false
    }

    Fair warning, this disables trust for all workspaces including local ones, not just remote Coder workspaces. VS Code doesn't offer a way to scope it per-remote unfortunately.

    We've commented on the upstream issue to try to get some movement on it. If you're hitting this too, giving microsoft/vscode#289835 a thumbs up would help.

  3. kcon-stackav commented on Apr 1, 2026

    @kcon-stackav
    Author

    Thanks @EhabY! I added a thumbs up to microsoft/vscode#289835 but I noticed that issue's report seems to mention a freezing aspect that I'm not sure we're experiencing on our end. Is there any possibility this issue is distinct from that one?

  4. EhabY commented on Apr 2, 2026

    @EhabY
    Collaborator

    It's not exactly the same yeah, in our case there is no freezing but there is no persistence. I've left a comment there and I'll open a new issue if turns out to be different but this issue is very much upstream

  5. added
    upstreamIssues due to an upstream issue in VSCode or other dependency.
    on Apr 2, 2026
  6. EhabY commented on Apr 14, 2026

    @EhabY
    Collaborator

    I just tried applying the fix here and the trust issue seems to be gone for that workspace: microsoft/vscode#289835 (comment)

    Hopefully this is fixed from the VS Code side as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

upstreamIssues due to an upstream issue in VSCode or other dependency.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions