--: eval: line 1: unexpected EOF while looking for matching `)' --: eval: line 2: syntax error: unexpected end of file --: dump_bash_state: command not found

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When Cursor attempts to run terminal commands, the terminal becomes corrupted and unusable until Cursor is restarted. The issue appears more frequently after performing many operations (suggesting possible state accumulation or resource leak). The issue is intermittent - restarting Cursor and retrying the same command often works.
Error Messages:
–: eval: line 1: unexpected EOF while looking for matching `)’
–: eval: line 2: syntax error: unexpected end of file
–: dump_bash_state: command not found

Steps to Reproduce

I can’t directly reproduce this. I need to grind cursors agent in order to get to a point where terminal gets corrupted

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.34 (Universal)
VSCode Version: 1.105.1
Commit: 643ba67cd252e2888e296dd0cf34a0c5d7625b90
Date: 2026-01-10T21:17:10.428Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.2.0

For AI issues: which model did you use?

Opus 4.5

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. This is a known issue with the agent terminal. We’ve seen a few similar reports with the same eval/dump_bash_state errors.

Related threads:

The team is working on a fix, but we need a bit more info to debug:

  1. Which shell are you using, bash or zsh? You can check with: echo $SHELL and $SHELL --version
  2. Do you have any customizations in .bashrc or .zshrc like complex prompts or functions?
  3. Can you check your PATH? Run echo $PATH and share the output. We’re especially interested if it includes any directories with parentheses
  4. Try running Cursor with a clean shell config by temporarily renaming .bashrc or .zshrc. Does the issue still happen?

If you can catch the moment when the terminal starts breaking, a screenshot showing the sequence of commands right before the error would also help.

1 Like

I had the same issue. By commenting out my .bash_profile contents I made it work again. This was my .bash_profile.


export NVM_DIR="$HOME/.nvm"
  [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"  # This loads nvm
  [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion

# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"

# Homebrew: Python
export PATH="/opt/homebrew/opt/python/libexec/bin:$PATH"

export CPPFLAGS="-I$(brew --prefix libheif)/include" && export LDFLAGS="-L$(brew --prefix libheif)/lib"

. "$HOME/.local/bin/env"

. "$HOME/.cargo/env"
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"

can’t tell you which command it was that broke cursor but maybe it helps your dev team.

And you also asked for a screenshot of the commands called when it happens again:

Thanks. I do have some path overwrites that I must keep.
I’ll try to clear up everything else I can and see if this works.

what’s interesting is that it doesn’t happen right away, it happens after a while of usage

same for me. The cleanup apparently makes work a little longer, but I realized even with commenting out everything it happens after some time.

  • Shell: /bin/bash

  • Version: GNU bash 3.2.57(1)-release (arm64-apple-darwin25)

  • Note: This is a pretty old version of bash (2007). macOS ships with this ancient version due to licensing (GPLv3 avoidance). Consider using a newer bash via Homebrew if you need modern features.

PATH Analysis

Your PATH is clean — no directories with parentheses detected. Here’s what’s in it:

/Library/Frameworks/Python.framework/Versions/3.14/bin

/opt/homebrew/opt/postgresql@15/bin

/Users/x/.codeium/windsurf/bin

/Users/x/.nvm/versions/node/v22.13.1/bin

/Applications/Visual Studio Code.app/Contents/Resources/app/bin

/Users/x/.local/bin

/usr/local/bin

/opt/homebrew/bin

/opt/homebrew/sbin

Thanks for the info about the shell and PATH.

Interesting point from both of you: the issue doesn’t show up right away, it starts after the IDE has been running for a while. That helps narrow down what might be causing it.

@bubblegumsoldier, thanks for the screenshot and for finding a workaround with .bash_profile. It’s especially helpful to know that even with an empty config, the issue still comes back over time.

I’ll pass this info to the team. For now, the only reliable workaround is restarting Cursor when the terminal starts acting up.

Hi,

it has been 8 days already, any updates so far ?
Having to restart cursor every 10-15mn really disrupts the flow

i’ve tried cleaning up my bash profile a bit which made it a bit longer but so far i still find myself restart cursor because the terminal is jammed.

1 Like

anyone on this thread using pytest or uv?
i noticed that usually it works until i run unit tests.
then shortly but not always immediately after it breaks

1 Like

yes uv and pytest… that might be it

Cursor team I would look at venv dependency or mutation of terminal somehow?