﻿# VS Code Workspace Trust: why agent tools depend on workspace state

Check Workspace Trust before troubleshooting disabled execution features; trusting a folder and configuring an agent's action permissions are distinct decisions.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-vscode-trust-agent-tools/
Language: en

VS Code Workspace Trust changes which development features can execute in an opened project. Restricted Mode limits capabilities including agents, terminal, tasks, debugging, and some extensions. A missing agent action can therefore reflect workspace state rather than model ability or a broken installation. Understanding the boundary helps diagnose the limitation without treating a request for trust as an ordinary code-generation error.

## Project contents can influence execution

A repository can contain tasks, settings, scripts, and extension configuration that affect what happens when development features run. Opening source text is different from executing that project-defined behavior. Workspace Trust makes this distinction visible through Restricted Mode. Read the project's relevant setup and provenance before changing trust state. The point is to understand the execution relationship, not to blame a language model for a capability deliberately unavailable in the current workspace.

Primary reference: [VS Code: Workspace Trust](https://code.visualstudio.com/docs/editing/workspaces/workspace-trust).

## Restricted Mode explains several missing features

The status bar and trust interface expose whether the workspace is restricted. Current documentation describes limitations affecting several execution-oriented features, including agents. Check that state before reinstalling extensions or changing models. A user can still inspect code while some actions remain unavailable. Keep this observation separate from a permission denial produced later by an agent harness or operating-system control; those occur at different layers and can require different resolutions.

Primary reference: [VS Code: How Copilot Understands Your Workspace](https://code.visualstudio.com/docs/agents/reference/workspace-context).

## Terminal and tasks are project-aware execution

A shell or task can load workspace-specific configuration and run committed scripts. This is why executing a familiar command can have more context than its visible name suggests. Inspect the intended working directory and task definition when diagnosing a prompt. Avoid treating trust as a button to press automatically whenever a tool is inconveniently blocked. The meaningful decision concerns the project and execution behavior, not a generic preference for faster agent progress.

Primary reference: [VS Code: Add Context to Chat](https://code.visualstudio.com/docs/chat/copilot-chat-context).

## Trust does not describe every extension's behavior

Workspace Trust is not a guarantee that an arbitrary malicious extension cannot execute code. Extensions have their own publishers, capabilities, and declared support for restricted workspaces. Current documentation distinguishes disabled and limited extension behavior. Inspect the relevant extension state rather than assuming the same treatment for all tools. A reliable explanation identifies the component enforcing the restriction and the documented scope of that enforcement instead of claiming a universal security boundary around the entire editor process.

## Diagnose the layer before changing configuration

Start with the visible workspace state, then the selected harness, tool availability, and action-specific permissions. Change only the configuration relevant to the authorized workflow. Re-run the original small action to confirm the diagnosis. The useful outcome explains why a feature was unavailable and what condition governs it. It should not recommend disabling multiple controls merely because the user wants an agent to complete ordinary development work in a familiar repository.

Related reading: [Continue vs Cline vs Aider for local coding](/journal/continue-cline-aider-coding-choice/); [Reproducible inference stacks: preserving a GPU pilot’s result](/journal/software-stack-reproducibility/).
