How does Cursor inject env variables that I’ve removed

:white_check_mark: Check the forum to ensure the issue hasn’t been reported already
Not found similar issues.

:lady_beetle: Provide a clear description of the bug
I’m encountering a confusing issue with cursor behavior regarding environment variables. I’m trying to test my code by commenting out or even deleting specific env variable exports from my shell configuration, but cursor still injects these variables into the environment.

The Issue:
Even when I remove or comment out env variable exports (e.g., for OAuthClientID, Password, etc.) in my ~/.bashrc, those variables still appear in my environment when I start a new terminal. I used renaming and deletion of the ~/.cursor-server directory as a test method to isolate the issue. Even when I delete that directory, the env variables presumably cached or stored by cursor are injected into the environment.

through recursive call I was able to find where this variables cached maybe this will give a better idea why this happens.
.cursor-server/data/User/History/-67aaabbf/2fUb:export OAuthClientSecret=‘123456789’

Why This is a Problem:
This behavior prevents me from testing my code in a “clean” environment, as cursor appears to override my settings by re-injecting variables from its own history or cache. I suspect that cursor is designed to maintain its own persistent context (including environment variables) for its integrated terminal, but this is causing unexpected interference. I’d like to understand why it does this and whether there’s a way to disable or modify this behavior.

:counterclockwise_arrows_button: Explain how to reproduce the bug (if known)
I don’t know how to reproduce.

:camera: Attach screenshots or recordings (e.g., .jpg, .png, .mp4).
No screenshots

:laptop: Tell us your operating system and your Cursor version (e.g., Windows, 0.x.x).
Microsoft Windows 11 Professionnel
10.0.26100 N/A Build 26100

Linux (WSL/Ubuntu) system
WSL version: 2.4.12.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.3476

:prohibited: Tell us if the issue stops you from using Cursor.
No yet but it’s frustrating to to spend half of the day trying to identify why the heck variables are injected.