Incorrect Modification of Windows User PATH by Cursor

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Yesterday, I installed the STM32 programming environment with assistance from Cursor.
It seems that Cursor did not correctly manage the existing environment variables. Rather than appending to the existing entries, it created new ones, which may have caused conflicts or loss of prior configurations.

Steps to Reproduce

The exact steps to reproduce the issue are unclear. I primarily relied on Cursor to assist with installing the STM32 environment, and the problem seems to have occurred during this automated setup process.

Operating System

Windows 10/11

Version Information

Version: 2.5.26 (user setup)
VSCode Version: 1.105.1
Commit: 7d96c2a03bb088ad367615e9da1a3fe20fbbc6a0
Date: 2026-02-26T04:57:56.825Z
Build Type: Stable
Release Track: Early Access
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

What happened here: during the STM32 environment setup, the AI model generated a command, most likely setx PATH "...", that overwrote your PATH completely instead of appending to it. Cursor doesn’t modify PATH directly, this is done by terminal commands generated by the model.

What you can do now:

  1. Restore PATH: if you have a System Restore Point, you can roll back environment variables. Or manually add the missing entries via System Properties > Environment Variables.

  2. Turn off Auto-run mode if it’s enabled: Cursor Settings > agents > turn off “Auto-run mode”. This makes the agent ask for confirmation before every terminal command, so you can review what it’s about to run.

  3. Always review commands before confirming, especially setx, reg add, and other commands that change system settings.

The team is aware of this class of issues. There’s no specific ETA, but your report helps with prioritization.

Let me know if you were able to restore your PATH.

Hi Dean,

Thanks for the clarification.

I wanted to add that I manually proceeded with the changes at the time, and I understand the potential risks involved—I’m able to take responsibility for the outcome. My intention in reporting this is mainly to surface the issue so your team is aware of it, especially since it could affect other users who might not notice what’s happening.

Appreciate the guidance on restoring PATH and the suggestions around Auto-run mode. I’ll be more cautious with system-level commands going forward.

Thanks again for the support.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.