16 lines appended to .bashrc on macOS when Cursor is started

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Each time I start Cursor, 16 new lines are being added to my ~/.bashrc file:

$ tail -5 ~/.bashrc
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"

Steps to Reproduce

This does not happen (to ~/.bashrc or ~/.zshrc) if I use /usr/bin/chsh to set my $SHELL back to the default value of /bin/zsh. So the steps to reproduce (on macOS) are likely:

  1. Use chsh to change your shell to /bin/bash
  2. run touch ~/.bashrc to ensure that file exists (unsure if this step is necessary)
  3. Start Cursor.app
  4. run cat ~/.bashrc to observe the lines added to the file.

Expected Behavior

At most, one line should get added to the file instead of accumulating 16 each time it starts.

Operating System

MacOS

Version Information

Version: 2.6.11 (Universal)
VSCode Version: 1.105.1
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990
Date: 2026-03-03T18:57:48.001Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

For AI issues: which model did you use?

Auto

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for reporting this!

I’ve seen this before, and it’s most likely not Cursor writing those lines repeatedly, but a line inside your ~/.bashrc that appends on every shell startup. Look for something like:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

That causes every new shell instance to add another copy. Replace it with just:

export PATH="$HOME/.local/bin:$PATH"

Then clean up the duplicates.

One of our ambassadors hit the same thing and confirmed:

“Found the cause. There was an echo 'export PATH=...' >> ~/.zshrc sitting in my zshrc instead of just the export, so every shell start appended a new line.”

Check ~/.bash_profile and ~/.profile too! If you’re still seeing it after that, let us know!

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