Check workspace trust before reviewing an unfamiliar VS Code folder

Check the Restricted Mode badge and Workspace Trust editor before treating the folder as untrusted. Based on official documentation (checked 11 Oct 2026).

VS Code documents unfamiliar folders opening in Restricted Mode, but inherited parent trust can affect the actual state. Connecting to a GitHub Codespace or attaching to a running Docker container are automatically trusted workflow examples. The command-line switch --disable-workspace-trust disables Workspace Trust for the current session.

  1. Look for the Restricted Mode badge in the Status Bar.
  2. Select the badge or Manage in the banner to open the Workspace Trust editor. Alternatively, run Workspaces: Manage Workspace Trust from the Command Palette.
  3. Review the editor's trust state and full list of disabled features.
  4. Inspect Trusted Folders & Workspaces for inherited parent-folder trust.

You can browse and edit source code without granting trust. Some language features may be disabled, but text editing remains supported.

Inspect executable paths before applying workspace settings

Inspect unapplied settings before trusting the folder, especially paths to executables such as linter binaries. VS Code warns that executable paths pointing to malicious code could cause damage. We recommend reviewing limited extensions alongside those settings.

  1. In the Workspace Trust editor, select the link for workspace settings that aren't being applied.
  2. Inspect the Settings editor filtered by @tag:requireTrustedWorkspace, including executable paths.
  3. Select the extensions are disabled or have limited functionality link.
  4. Review extension status in the Extensions view filtered by @workspaceUnsupported.

For a single-folder workspace, workspace settings are stored in the project-root .vscode folder. Multi-root workspace-level settings reside in the workspace configuration file instead. Use Preferences: Open Workspace Settings (JSON) to access workspace settings.

Comparable ordinary workspace settings override user values where workspace scope is supported. That doesn't mean every workspace value wins: language-specific user settings can override non-language-specific workspace settings, administrator policy always takes precedence, and object-valued settings merge.

Scope or value type:
Single-folder workspace
Documented storage or behavior:
Project-root .vscode folder
Limit to remember:
Ordinary workspace-over-user precedence applies where supported
Scope or value type:
Multi-root workspace level
Documented storage or behavior:
Workspace configuration file
Limit to remember:
Workspace-level storage differs from the single-folder case
Scope or value type:
Language-specific user settings
Documented storage or behavior:
Can override non-language-specific workspace settings
Limit to remember:
Workspace scope alone doesn't determine the effective value
Scope or value type:
Administrator policy
Documented storage or behavior:
Always overrides other setting values
Limit to remember:
Policy takes precedence
Scope or value type:
Primitive and array values
Documented storage or behavior:
Overridden according to scope precedence
Limit to remember:
Object values merge instead
Scope or value type:
Application-wide update and security settings
Documented storage or behavior:
Cannot be overridden by workspace settings
Limit to remember:
Workspace configuration doesn't override these settings

Note: Reviewing extension status isn't protection against malicious extensions. Workspace Trust can't prevent a malicious extension from executing code and ignoring Restricted Mode. Install and run extensions from well-known publishers you trust.

Status, settings and extension inspection checklist
Original documentation checklist, not a UI capture. Extension-status inspection cannot prevent malicious extensions from ignoring Restricted Mode. Source: VS Code Workspace Trust, checked 11 Oct 2026

Keep the terminal default unless the shell meets the exception

Keep the default terminal restriction unless your shell is configured to prevent automatic code execution based on workspace contents. Opening a terminal is blocked by default in Restricted Mode because shells can source .env files or run initialization scripts that reference the current directory.

After configuring the shell to prevent that behavior, the documented exception lets you enable terminal.integrated.allowInUntrustedWorkspace to open terminals without a trust prompt. Enabling the setting alone doesn't meet the shell-configuration prerequisite.

Canceling the terminal trust dialog keeps VS Code in Restricted Mode and doesn't open the terminal. Even enumerating tasks through Tasks > Run Task prompts for trust; canceling preserves Restricted Mode.

Workspace trust is shared between the VS Code window and the Agents window. An untrusted workspace prevents agents from running in either place. VS Code also warns that a file pulled into agent context could theoretically result in a prompt injection attack.

Trust the reviewed folder and account for its subfolders

Trust the reviewed folder when your intended scope is that folder and its subfolders. Trusting a parent applies trust to the parent and all its subfolders, so review the effect on sibling folders before choosing or changing a parent entry.

Choice:
Stay in Restricted Mode
Documented scope:
Features remain disabled or limited; text editing is supported
Decision guidance:
Continue review while you're unsure
Choice:
Trust the folder
Documented scope:
Folder and its subfolders
Decision guidance:
Match trust to the reviewed subtree
Choice:
Trust a parent
Documented scope:
Parent and all its subfolders
Decision guidance:
Review the broader tree, including sibling folders

Use the banner or Workspace Trust editor when you're ready to trust the folder. Trusted Folders & Workspaces also supports adding, editing and removing entries; the active folder is highlighted in bold.

Remove the trust entry that covers the current folder

Remove trust through Don't Trust or the applicable Trusted Folders & Workspaces entry, accounting for inherited parent trust. A parent entry applies trust to its subfolders, so removing a separate child entry doesn't resolve trust inherited from that parent.

  1. Run Workspaces: Manage Workspace Trust from the Command Palette.
  2. Select Don't Trust, or remove the folder from Trusted Folders & Workspaces.
  3. If Don't Trust is missing, inspect the list for a trusted parent.
  4. Review the parent's reach to sibling folders before changing its entry.
  5. Check the current Restricted Mode badge, Workspace Trust editor state and disabled-feature list after the change.

We recommend checking those current indicators rather than assuming the intended scope took effect. The badge identifies Restricted Mode, and the Workspace Trust editor shows the full list of disabled features.

Folder scope and trust-removal summary
Original documentation summary of trust scope, removal and current-state inspection; not a UI capture. Source: VS Code Workspace Trust, checked 11 Oct 2026

Review multi-root changes before accepting broader trust

Adding an untrusted folder to a trusted multi-root workspace can switch the entire workspace to Restricted Mode. VS Code prompts you to decide whether you trust the new folder's files; declining trust can restrict the whole workspace.

Keep settings storage and trust scope separate in your review: multi-root workspace-level settings reside in the workspace configuration file, while a trusted parent applies trust to its subfolders. Inspect the current trust state and disabled features after changing the workspace's folder composition.