Opening the cursor terminal generates files `activate` and `zsh`

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Whenever I (or an agent) opens a terminal, this generates the (empty) files activate and zsh. This is pretty annoying because they become the “active” tabs, hiding my current work and forcing me to click through a dialoge to delete them.

Steps to Reproduce

To reproduce this, you would have to have mise installed and activated in the zshrc. Once that’s done, this happens any time a terminal is opened for the first time in a project.

Screenshots / Screen Recordings

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.4.5
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Linux x64 6.8.0-65-generic

I got the same issue, I also have mise installed.

This is from chatgpt and it works for me!


Guard mise so it doesn’t run in Cursor/VSCode shells

Add this around your mise activation in ~/.zshrc:

# Only activate mise in *real* interactive terminals, not in VSCode/Cursor
if [[ $- == *i* ]] && [[ "$TERM_PROGRAM" != "vscode" ]] && [[ -z "$CURSOR" ]]; then
  eval "$(/home/<username>/.local/bin/mise activate zsh)"
fi

Cursor usually sets TERM_PROGRAM=vscode. If it doesn’t in your build, the extra [[ -z "$CURSOR" ]] guard helps.

Restart Cursor. If the files no longer appear, keep this.

Thanks for the hint. Unfortunately, this workaround does not cut it for me since I want my mise tools to be available in the interactive terminal.