Serious Boundary Issue bypass

I was working on a tool and cursor violated the boundary to not touch files outside of the workspace. By editing in another workspace in pre-production. Glady I spotted in ime but this could have been disastrous.

Where does the bug appear (feature/product)?

  • Editor, Tab & Chat (autocomplete, Composer, in-editor agent)
  • Terminal & commands
  • Models, pricing & API keys (availability, Auto/Max, BYOK/Bedrock)
  • MCP & tools
  • Cloud Agents & Automations (cursor.com/agents, scheduled/event)
  • BugBot & Code Review
  • Cursor CLI
  • Cursor Mobile
  • Remote (SSH / Dev Containers / WSL)
  • Account, billing & login
  • Something else…

Describe the Bug
I asked Cursor to edit a function in a project. This project is a parser to clean data that is feed into another tool.

Cursor decided to jump the bounday and edit the the other tool instead.

Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!

  1. Have two workspaces on the same environment.
  2. Have the two projects interwine in some way
  3. Have external boundary protection activated to only edit files on the workspace
  4. Ask cursor to implement a change that might need a change in the other tool in another worskpace but was not asked.

Expected Behavior
Only touch files within the directory of the workspace. Not outside it.


Screenshots / Screen Recordings
Already added


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
Version: 3.14.7 (user setup)
VS Code Extension API: 1.128.0
Commit: a758f2241ca99fecf380180b6cbdbbce0f1f42c0
Date: 2026-07-30T06:41:34.009Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26200

CLI:
CLI Version 2026.01.17-d239e66


For AI issues: which model did you use?
Model name (Cursor Grok 4.5)


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable
  • Sometimes - I can sometimes use Cursor
  • No - Cursor works, but with this issue

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Editor, Tab & Chat (autocomplete, Composer, in-editor agent)
  • Terminal & commands
  • Models, pricing & API keys (availability, Auto/Max, BYOK/Bedrock)
  • MCP & tools
  • Cloud Agents & Automations (cursor.com/agents, scheduled/event)
  • BugBot & Code Review
  • Cursor CLI
  • Cursor Mobile
  • Remote (SSH / Dev Containers / WSL)
  • Account, billing & login
  • Something else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!


Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable
  • Sometimes - I can sometimes use Cursor
  • No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

Hey, thanks for the report. I get the concern. Unexpected changes near pre-production are really stressful.

First, about boundaries. There are two different mechanisms:

External-File Protection blocks the agent from writing outside the workspace through its edit tool. That means create, modify, delete. It does not restrict reads.

Terminal commands work differently. They go through Run Mode and Sandboxing in Settings > Agents > Approvals & Execution. If sandboxing is enabled in Auto-review or Allowlist, commands are also blocked from writing outside the workspace at the sandbox level. But there are exceptions. In Run Everything, the sandbox is not applied at all, and commands that need full access can bypass the sandbox and will ask for approval. More details: Run Modes | Cursor Docs

To understand what happened, can you share a few details?

  • Did the change show up as an agent diff card from the edit tool, or did it run a terminal command? You can see this in chat history.
  • What Run Mode are you using? Auto-review, Allowlist, or Run Everything?
  • Do you have one parser project open, or both projects as a multi-root workspace via .code-workspace? If the second project is physically inside the workspace root, it counts as inside.
  • Is the /home/… path in a remote SSH or WSL environment? And can you confirm the actual content changed with git diff in that folder?

While you check, here are recovery options. If the folder is under git, git restore or git reflog can get you back. Cursor also has Local History via Cmd+Shift+P then search for Local History.

For stricter isolation going forward, open a workspace that is not inside the other project’s folder tree, so ../ can’t reach it on disk. Also note that .cursorignore hides files from the edit tool and AI features, but it is not a hard security boundary for the terminal. Physical folder separation and the right Run Mode are more reliable.

Send the details above and we can dig deeper. Also, the agent’s self-report like I went out of bounds is not always accurate. The model often agrees with the framing, so we need to confirm the real mechanism behind the change.

Hi

Answering your questions:

Did the change show up as an agent diff card from the edit tool, or did it run a terminal command? You can see this in chat history.

  • Yes, it showed as changed diff.

What Run Mode are you using? Auto-review, Allowlist, or Run Everything?

  • Auto-Review

Do you have one parser project open, or both projects as a multi-root workspace via .code-workspace? If the second project is physically inside the workspace root, it counts as inside.

  • Both projects were open with different users remote ssh access, in different windows. Same server, different working directories. One in home/usera/projecta another in home/userb/projectb

Is the /home/… path in a remote SSH or WSL environment? And can you confirm the actual content changed with git diff in that folder?

  • Remote local ssh server..
  • Content when detected had only changed one file so was easy to revert, I stopped the agent straight away to a avoid further damage.

Thanks for stopping the agent and rolling back. That was the right call, and it’s good it only touched one file.

The details make sense, but I want to lock down the exact mechanism so we don’t mix it up with normal behavior. When External-File Protection is enabled, the edit tool’s diff card shouldn’t apply to files outside the workspace root, so one thing really matters here:

  • Which window did the diff card show up in, the one opened as usera at /home/usera/projecta, or the userb window? In other words, did the agent you asked to edit the parser in projecta apply a change to a file in /home/userb/projectb?
  • Can you confirm the workspace root of that window (what you see in the title or in the explorer) and the full path of the changed file from the diff card or from the rollback git history?

This separates two scenarios: the edit tool actually writing outside the workspace boundary vs the agent in the second window making a change inside its own project.

If I get an update, I’ll post it here.

For the future, for stricter isolation: keep your windows set up so one workspace root can’t be reached via ../ from the other on disk, and for unfamiliar tasks you can use Plan mode. More on boundary behavior and Run Modes here: https://cursor.com/docs/agent/security/run-modesThanks for stopping the agent and rolling back. That was the right call, and it’s good it only touched one file.

The details make sense, but I want to lock down the exact mechanism so we don’t mix it up with normal behavior. When External-File Protection is enabled, the edit tool’s diff card shouldn’t apply to files outside the workspace root, so one thing really matters here:

  • Which window did the diff card show up in, the one opened as usera at /home/usera/projecta, or the userb window? In other words, did the agent you asked to edit the parser in projecta apply a change to a file in /home/userb/projectb?
  • Can you confirm the workspace root of that window (what you see in the title or in the explorer) and the full path of the changed file from the diff card or from the rollback git history?

This separates two scenarios: the edit tool actually writing outside the workspace boundary vs the agent in the second window making a change inside its own project.

If I get an update, I’ll post it here.

For the future, for stricter isolation: keep your windows set up so one workspace root can’t be reached via ../ from the other on disk, and for unfamiliar tasks you can use Plan mode. More on boundary behavior and Run Modes here: Run Modes | Cursor Docs

Hi Dean

I cqn confirm that the diff showed on project A where we were correcting bugs. That the file changed was on project b.

So to be clear: the agent in projecta touched and executed changes on project b because the solution he was implemented required changes in projectb. So he jumped outside the boundary and changed files in project b. A boundary that he should not have jumped.

But this has a more complex underline issue he used knowledge from other projects to create a solution to a bug. There should have been total code isolation and he should not have even had access to the other agent/workspace code in the first place.

Thanks for confirming the details, that’s exactly what we needed to untangle.

Let’s split this into two separate issues, since they’re about different mechanisms.

  1. Editing a file in projectb (writes outside the workspace).
    This is the key point. With External-File Protection enabled, the edit tool shouldn’t apply a change to a file outside the current window’s workspace root without explicit approval, and this does not depend on Run Mode. What you’re describing, a diff card shown in the projecta window, but the file changed in projectb, is not the expected behavior, and it’s not caused by your settings. I’ve shared this with the team and we’re tracking it. I can’t promise a timeline yet, but I’ll post here if there’s an update.

To fully confirm what happened, could you share two details:

  • the exact workspace root of the window where the diff showed up, from the title bar or explorer
  • the full path of the changed file from the git rollback history

This will let us clearly separate edit tool actually writing across the boundary from a case where the agent made the change in the second window.

  1. The agent knew code from another project.
    This is different, and it’s by design. External-File Protection only limits writes (create, modify, delete) outside the workspace, not reads. The model can read files outside the workspace root if it thinks it helps with context, especially if the path is reachable via ../ on the same server. So this setting alone won’t give you full code isolation.

If you need strict isolation between projects:

  • set your workspace root so the other project can’t be reached via ../ on disk, ideally separate machines or containers, not neighboring folders on the same server
  • for sensitive paths, use Global ignore files in settings, they apply to all projects: Ignore File | Cursor Docs
  • for unfamiliar tasks, you can run them in Plan mode

More on boundaries and Run Modes here: Run Modes | Cursor Docs

Send the two details above and we can dig in further.

I had included the workspaces roots on a previous response.

Project A (the one we were working one)

/home/user/projecta

Project B

/home/userb/projectb

Those are workspace roots.

The file edited was:

/home/userb/projectb/shared/database/dbapi/ui/markdown.ts

Thanks, that was exactly the missing detail. The workspace roots and the full path of the changed file make it clear.

Summary on the two points:

  1. Edit in projectB writing outside the workspace. The diff card showed up in the projectA window, but the changed file /home/userb/projectb/shared/database/dbapi/ui/markdown.ts is outside that window’s root. With External-File Protection enabled, the edit tool shouldn’t apply changes outside the workspace root without explicit approval, and this doesn’t depend on Run Mode. This shouldn’t happen, and it’s not caused by your settings. I’ve passed this to the team and we’re tracking it. I can’t share a timeline yet. If there’s an update, I’ll reply here.

  2. The agent knew code from projectB. That’s a separate mechanism and it’s by design. External-File Protection only limits writes create, modify, delete outside the workspace, it doesn’t block reads. The model can read files outside the root if it thinks they’re useful for context, especially when the path is reachable via ../ on the same server. So this setting alone doesn’t fully isolate code.

For strict isolation going forward:

  • Set up workspace roots so a neighboring project can’t be reached via ../ on disk. Ideally use separate machines or containers, not sibling folders on the same server.
  • For sensitive paths, use Global ignore files, they apply to all projects: Ignore File | Cursor Docs
  • For unfamiliar tasks, you can run in Plan mode.

More on boundaries and Run Modes: Run Modes | Cursor Docs

Let me know if anything else comes up on this case.