Opening a folder discloses its full absolute path to the agent

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When I open a folder as a workspace, the agent already knows the full absolute path of that folder at the start of the chat. The path includes my OS username and every parent directory, not only the folder I opened.

The agent does not need to run a command, read a file, or leave the workspace to learn this. The path is present in the session context before any tool call.

Steps to Reproduce

Open a local folder as the workspace.
Start a new agent chat.
Ask the agent for the full path of the current directory, and tell it not to run any commands or read any files.
The agent returns the absolute path, including the home directory, username, and parent folders.

Expected Behavior

Opening a folder should limit the agent to that folder. The model should not receive the folder’s location on disk.

Operating System

Linux

Version Information

Version: 3.29.15
VS Code Extension API: 1.128.0
Commit: 86776fcb52ca505783155631089b65d646f9b030
Date: 2026-11-08T21:35:59.668Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 43.8.4
Chromium: 150.0.7871.250
Node.js: 24.22.1
V8: 15.0.245.31-electron.0
xterm.js: 6.1.0-beta.291
OS: Linux x64 6.17.0-1033-oem

Additional Information

The absolute path is supplied with the session. Usernames and parent directory names are exposed with it. Those names can identify the machine user and reveal client, organization, or project layout that sits outside the opened folder.

This is another hole in the workspace boundary. Folder contents and folder location are different things. The location is local identity and directory layout, and it is being handed to the model (and to whatever stores or processes the prompt) as soon as the chat starts. A workspace root the tools can use does not require putting the full host path into the model context.

Please confirm whether this disclosure is intentional. If it is, it should be documented as a privacy behavior. If it is not, the agent should receive a workspace-scoped root that does not reveal the username or parent directories.

Does this stop you from using Cursor

Yes - Cursor is unusable

Hi @gschelotto, yes, this is intentional. At the start of every chat the agent is given the absolute path of the folder you opened, because its tools and terminal address files by absolute path. It’s also given the location of two Cursor folders for that project under your home directory (terminal output and past chats), so your username is in there as well.

That’s separate from the workspace boundary. Read Access and the sandbox limit what the agent’s tools can touch, not what the model is told about where the folder lives.

The path is handled like the rest of the prompt. With Privacy Mode on, as you have it, it isn’t used for training and model providers don’t retain it: Cursor · Data Use & Privacy Overview

Thanks for the clarification, but I believe the response misses the core issue.

The problem is not whether the agent has permission to access directories outside the workspace. The problem is that it receives information about those directories in the first place.

Read Access restrictions, sandboxing, and Privacy Mode address different security concerns. They do not eliminate unnecessary information disclosure.

Absolute paths can expose sensitive information, including usernames, client names, internal project structures, and confidential business context. Even if the agent cannot access those directories, it already knows this information.

I also understand that Cursor’s tools and terminal integration may require absolute paths internally. However, that does not mean the full host filesystem path needs to be included in the model’s context.

A virtual workspace abstraction (e.g. /workspace), with path resolution handled internally by Cursor, could preserve functionality while minimizing unnecessary disclosure.

The principle should be simple: the model should know which workspace it is working on, not necessarily where that workspace physically resides on the user’s machine.

This is not just about access control. It is about data minimization and the principle of least privilege.

I would strongly encourage the Cursor team to reconsider this architectural decision rather than treating it as an unavoidable implementation detail.