# \--: eval: line 1: unexpected EOF while looking for matching \`)' --: eval: line 2: syntax error: unexpected end of file --: dump\_bash\_state: command not found

**URL:** <https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646>\
**Category:** Bug Reports\
**Tags:** terminal, performance\
**Created:** [January 12, 2026, 11:49am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646 "2026-01-12T11:49:01Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nisco](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nisco](https://forum.cursor.com/u/nisco)\
**Post date:** [January 12, 2026, 11:49am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/1 "2026-01-12T11:49:01Z")

</div>

### 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

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 12, 2026, 1:16pm UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/3 "2026-01-12T13:16:35Z")

</div>

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:

- [Cursor can't run terminal commands](https://forum.cursor.com/t/cursor-cant-run-terminal-commands/141450)
- [--: line 1: dump\_bash\_state: command not found](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675)
- [# Bug Report: dump\_bash\_state fails with PATH containing parentheses on Windows](https://forum.cursor.com/t/bug-report-dump-bash-state-fails-with-path-containing-parentheses-on-windows/144863)

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.

---

<div class="post-metadata">

**Author:** ![bubblegumsoldier](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bubblegumsoldier/32/26882_2.png) [@bubblegumsoldier](https://forum.cursor.com/u/bubblegumsoldier)\
**Post date:** [January 15, 2026, 8:42am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/4 "2026-01-15T08:42:32Z")

</div>

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

```bash

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.

---

<div class="post-metadata">

**Author:** ![bubblegumsoldier](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bubblegumsoldier/32/26882_2.png) [@bubblegumsoldier](https://forum.cursor.com/u/bubblegumsoldier)\
**Post date:** [January 15, 2026, 9:06am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/5 "2026-01-15T09:06:37Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/b/4/b47dbad9cdf7827197e08b2e0ba3f1672d106395.png)

---

<div class="post-metadata">

**Author:** ![nisco](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nisco](https://forum.cursor.com/u/nisco)\
**Post date:** [January 15, 2026, 9:36am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/6 "2026-01-15T09:36:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nisco](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nisco](https://forum.cursor.com/u/nisco)\
**Post date:** [January 15, 2026, 9:36am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/7 "2026-01-15T09:36:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bubblegumsoldier](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bubblegumsoldier/32/26882_2.png) [@bubblegumsoldier](https://forum.cursor.com/u/bubblegumsoldier)\
**Post date:** [January 15, 2026, 9:58am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/8 "2026-01-15T09:58:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nisco](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nisco](https://forum.cursor.com/u/nisco)\
**Post date:** [January 15, 2026, 11:52am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/9 "2026-01-15T11:52:07Z")

</div>

- **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

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 16, 2026, 4:25am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/10 "2026-01-16T04:25:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mehdi-dbrx](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mehdi-dbrx/32/95134_2.png) [@mehdi-dbrx](https://forum.cursor.com/u/mehdi-dbrx)\
**Post date:** [January 20, 2026, 10:06am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/12 "2026-01-20T10:06:50Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![nisco](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nisco](https://forum.cursor.com/u/nisco)\
**Post date:** [January 20, 2026, 10:20am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/13 "2026-01-20T10:20:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nisco](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nisco](https://forum.cursor.com/u/nisco)\
**Post date:** [January 21, 2026, 10:18am UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/14 "2026-01-21T10:18:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bubblegumsoldier](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bubblegumsoldier/32/26882_2.png) [@bubblegumsoldier](https://forum.cursor.com/u/bubblegumsoldier)\
**Post date:** [January 26, 2026, 12:34pm UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/15 "2026-01-26T12:34:55Z")

</div>

yes uv and pytest… that might be it

---

<div class="post-metadata">

**Author:** ![nisco](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nisco](https://forum.cursor.com/u/nisco)\
**Post date:** [January 26, 2026, 1:08pm UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/16 "2026-01-26T13:08:53Z")

</div>

> [@nisco](#):
>
> then shortly but not always immediately after it breaks

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [February 20, 2026, 5:32pm UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/18 "2026-02-20T17:32:57Z")

</div>

Hi @nisco and @bubblegumsoldier!

Can you let us know if the issue is still reproducible in 2.5?

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [March 14, 2026, 5:33pm UTC](https://forum.cursor.com/t/eval-line-1-unexpected-eof-while-looking-for-matching-eval-line-2-syntax-error-unexpected-end-of-file-dump-bash-state-command-not-found/148646/19 "2026-03-14T17:33:44Z")

</div>

Closed on March 14, 2026, 5:33pm UTC

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