The shell in the Terminal is too persistent

Describe the Bug

Typing exit in the shell running in Terminal does not actually terminate the shell. If you reopen the Terminal, it’s the same shell that keeps running, with the same environment variables declared in it, and it ignores shell config changes made meanwhile.

By contrast, if you type exit in the macOS Terminal, and you open a new Terminal, the shell is re-run from scratch, and will update its settings with whatever shell config changes you made meanwhile.

Why is this bad? I’ve wasted a lot of time recently troubleshooting an issue, while I was assuming I would get a fresh shell if I killed and restarted it, and its settings would be updated with the changes I was making outside of Cursor. That reasonable assumption is unfortunately not true for Cursor, and it’s especially confusing since the macOS Terminal behaves intuitively (exit means exit).

Steps to Reproduce

Make sure Cursor is completely shut down.

Edit ~/.zshrc and source up a shell script:

source ~/foobar.sh

In that shell script, export some variables:

export FOO="bar"

Start Cursor. Open a folder. In Cursor, open the Terminal. Run env | grep FOO to make sure the variable is declared. Type exit in the Terminal.

Separately, edit ~/.zshrc and comment out the source line.

In Cursor, open the Terminal again and run again env | grep FOO. The exported variable is still there.

Expected Behavior

The Cursor Terminal should behave just like the macOS Terminal: typing exit in the shell should kill the shell. Re-opening the Terminal should bring up a shell with all the config changes done while the Terminal was closed.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.3
VSCode Version: 1.96.2
Commit: 979ba33804ac150108481c14e0b5cb970bda3260
Date: 2025-06-15T06:35:49.230Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

I expeirence same issue today after upgrading my macbook os to the developer new release.