By Kim · Updated 11 Oct 2026 · Workspace Trust and settings guidance checked on official VS Code documentation
It depends: Leave an unfamiliar folder in Restricted Mode while you're unsure; grant trust when you're ready to trust the folder and its subfolders.
Good fit: Fits you if you need to browse and edit code while inspecting executable-path settings and limited extensions.
Not a fit: Restricted Mode won't suit a workflow that requires workspace agents, and it can't prevent malicious extensions from ignoring its restrictions.
| Review first | Browsing and text editing remain supported in Restricted Mode. |
|---|---|
| Actual status | Check the Restricted Mode badge and Workspace Trust editor; parent trust and automatically trusted workflows can affect the starting state. |
| Trust scope | Trusting a folder trusts its subfolders; trusting a parent applies to the parent and all its subfolders. |
| Settings precedence | Comparable ordinary workspace values override user values where supported, qualified by language-specific precedence, policy and object merging. |
| Terminal | Blocked by default; the documented exception requires a shell configured to prevent automatic workspace-dependent execution. |
| Reversal | Use Don't Trust or remove the applicable trusted entry; inspect parent trust if Don't Trust is missing. |
Keep an unfamiliar VS Code folder in Restricted Mode while you inspect it, but check its actual workspace trust state first. A trusted parent can cover the folder already, and some workflows are automatically trusted. Browsing and editing source code remain available in Restricted Mode.
We recommend looking beyond the trust prompt: inspect unapplied settings for executable paths and review limited extensions before deciding. Settings precedence has exceptions, and an extension-status check can't stop a malicious extension from ignoring restrictions. Then choose the folder scope you intend to trust, understand the removal controls and check the current restrictions after changing trust.
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.
- Look for the Restricted Mode badge in the Status Bar.
- Select the badge or Manage in the banner to open the Workspace Trust editor. Alternatively, run
Workspaces: Manage Workspace Trustfrom the Command Palette. - Review the editor's trust state and full list of disabled features.
- 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.
- In the Workspace Trust editor, select the link for workspace settings that aren't being applied.
- Inspect the Settings editor filtered by
@tag:requireTrustedWorkspace, including executable paths. - Select the extensions are disabled or have limited functionality link.
- 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.

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.
- Run
Workspaces: Manage Workspace Trustfrom the Command Palette. - Select Don't Trust, or remove the folder from Trusted Folders & Workspaces.
- If Don't Trust is missing, inspect the list for a trusted parent.
- Review the parent's reach to sibling folders before changing its entry.
- 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.

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.
Where this falls short: Restricted Mode can't stop malicious extensions
- Restricted Mode tries to prevent automatic execution by disabling or limiting features; a malicious extension can ignore it.
- Shell startup can execute workspace-dependent code before you type; the terminal exception requires preventing that behavior first.
- Language-specific precedence, administrator policy and object merging qualify ordinary workspace-over-user settings precedence.
- Inherited parent trust can explain a missing Don't Trust button and affects the parent's other subfolders.
Keep VS Code restricted or choose the intended trusted subtree
- Continue review in Restricted Mode: Use this while you're unsure; browsing and text editing remain supported.
- Trust the reviewed folder: Use this when you're ready to trust the folder and its subfolders.
- Trust the parent tree: Consider this for an intended parent-wide trust scope, accounting for all its subfolders.
What to have ready before changing VS Code folder trust
- Check the Restricted Mode badge, Workspace Trust editor state and disabled-feature list.
- Inspect unapplied settings with
@tag:requireTrustedWorkspace, including executable paths. - Review extensions with
@workspaceUnsupported; use well-known publishers you trust. - Distinguish single-folder and multi-root settings storage; account for language-specific precedence, policy and object merging.
- Keep the terminal default unless the shell meets the documented automatic-execution prevention condition.
- Choose the intended folder scope and review inherited parent trust and sibling-folder reach.
- To reverse trust, use Don't Trust or remove the applicable trusted entry.
- After changing trust, check the current badge, editor state and disabled-feature list again.
- Removing trust is not established to undo earlier code execution or external effects. Checking the current badge, editor state and disabled-feature list does not establish that those effects were reversed.
- Actual installation behavior, effective settings and post-removal protection were not runtime-tested. No installed extension or publisher was assessed.
- Documentation evidence is the official-page snapshot audited on 11 October 2026; current live-page changes were not checked.
Quick questions
How can I confirm the folder's current trust status before interacting with its contents?
Check the Restricted Mode badge and open the Workspace Trust editor through the badge, Manage or Workspaces: Manage Workspace Trust. Inspect parent entries if trust appears inherited.
How can I check current restrictions after removing trust, and what remains unverified?
Check the Restricted Mode badge and the Workspace Trust editor's current state and disabled-feature list. The limits on undoing earlier effects and runtime verification are listed under what we couldn't confirm.
Why is opening a terminal blocked by default, and what condition applies to the documented exception?
Shells can automatically execute code based on workspace contents. The documented exception requires configuring the shell to prevent that behavior before enabling terminal.integrated.allowInUntrustedWorkspace.

Keep the folder restricted while you're unsure. When you're ready, match trust to the reviewed subtree; if you reverse that decision, check the current restrictions. Those checks don't establish that earlier execution or external effects were undone.
- Choose the reviewed folder and its subfolders, accounting for inherited parent trust.
- After granting or removing trust, check the badge, Workspace Trust editor state and disabled-feature list.
Source list
- VS Code Workspace Trust (checked 11 Oct 2026)
- Visual Studio Code (checked 11 Oct 2026)
This guide draws on VS Code Workspace Trust and Visual Studio Code (2 pages), and its figures were checked against that text. Facts last checked 11 Oct 2026.