Step 2 · Set up your agent
Trusted folders: how the agent works in your folder
The folder you open is the agent's workspace. Trust only folders you made or got from people you trust, and read what the agent asks before you approve it.
Two trust questions
The first time you open a folder, you trust it twice: once for VS Code, and sometimes once for the agent.
-
VS Code checks first
A folder you haven't trusted opens in Restricted Mode. A banner across the top says so, and AI agents and the terminal are turned off. The Claude Code extension doesn't work there. Click Manage in the banner, then Trust.
Some setups ask up front instead: Do you trust the authors of the files in this folder? Yes, I trust the authors trusts it. No, I don't trust the authors keeps Restricted Mode.
-
Then the agent may ask
The first time it works in a folder, the agent may ask its own version, such as whether you trust the files in this folder. The same rule applies.
How the agent works in your folder
When the agent needs your OK to run a command, it shows a permission prompt. Read the command before you approve it. Pushes, deletes and installs deserve a careful look. To see a plan before any change, add this to your request:
Plan this first. Don't change anything until I say go.
See the agent's world
Which folder are you working in? List what's in it, and don't change anything.
If it goes wrong
VS Code says Restricted Mode, and the agent doesn't work
Click Manage in the Restricted Mode banner, then Trust. Or open the Command Palette (Ctrl + Shift + P, or Cmd + Shift + P on Mac), run Workspaces: Manage Workspace Trust and trust the folder.
The agent asks about a folder I didn't expect
Say no. Then check that VS Code opened your project folder, not a folder above it. The folder's name shows at the top of the Explorer view. Use File → Open Folder… to open the right one.
Saved only in this browser.