# \--: line 1: dump\_bash\_state: command not found

**URL:** <https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675>\
**Category:** Bug Reports\
**Created:** [November 29, 2025, 1:43pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675 "2025-11-29T13:43:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![FullPI](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FullPI](https://forum.cursor.com/u/FullPI)\
**Post date:** [November 29, 2025, 1:43pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/1 "2025-11-29T13:43:25Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Every command ends in

```auto
--: line 1: dump_bash_state: command not found

```

### Steps to Reproduce

Happens on every command any agent executes.

### Expected Behavior

No error message.

### Operating System

Windows 10/11

### Current Cursor Version (Menu → About Cursor → Copy)

Terminal: Git Bash  
Version: 2.1.39 (user setup)  
VSCode Version: 1.105.1  
Commit: 60d42bed27e5775c43ec0428d8c653c49e58e260  
Date: 2025-11-27T02:30:49.286Z  
Electron: 37.7.0  
Chromium: 138.0.7204.251  
Node.js: 22.20.0  
V8: 13.8.258.32-electron.0  
OS: Windows\_NT x64 10.0.26100

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<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:** [November 29, 2025, 4:06pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/2 "2025-11-29T16:06:34Z")

</div>

Hey, thanks for the report.

This matches a known issue with agent terminal initialization.

Quick things to try:

1. Settings → Agents → Inline Editing & Terminal → enable “Legacy Terminal Tool”, then Command Palette → “Terminal: Kill All Terminals” and restart Cursor.
2. In Git Bash, check your `~/.bashrc` for lines like “exec zsh” or others that change shell/environment on non-interactive startup. Remove or limit these lines (only for interactive shells) and test again.

Could you please clarify:

- Is this a local environment or Remote SSH?
- Any customizations in `~/.bashrc` or `~/.bash_profile`?
- Any errors in Help → Toggle Developer Tools → Console during the issue (screenshots or logs)?

Let me know if enabling Legacy Terminal Tool helps. If not, I’ll escalate this to the engineers.

---

<div class="post-metadata">

**Author:** ![FullPI](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FullPI](https://forum.cursor.com/u/FullPI)\
**Post date:** [November 29, 2025, 6:55pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/3 "2025-11-29T18:55:28Z")

</div>

Clarification:

1. Local
2. None.
3. No errors that occur at same time.

I can now reproduce the issue, if I ask the LLM `execute pwd on terminal` three times or ask it to `execute pwd on terminal 3 times`, the issue will occur on the third command executed.

I expect this is the same behaviour for any command.

---

<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:** [December 1, 2025, 4:23pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/4 "2025-12-01T16:23:24Z")

</div>

Thanks for the clarification. Interesting find with the third command - this helps localize the issue.

Your case is very similar to the resolved SSH problem: [AI Terminal over SSH fails with `dump_bash_state: command not found` and random "command not found" lines](https://forum.cursor.com/t/ai-terminal-over-ssh-fails-with-dump-bash-state-command-not-found-and-random-command-not-found-lines/143486)

There, the cause was exec zsh in .bash\_profile, which interrupted agent initialization. In your local Git Bash case, something similar might be happening - something in the environment interrupts dump\_bash\_state after a few commands.

Could you please check:

- Are there lines like `exec`, source of other shells, or commands changing the environment in `~/.bashrc` or `~/.bash_profile`?
- Does this reproduce with Legacy Terminal Tool enabled (Settings → Agents → Inline Editing & Terminal → “Legacy Terminal Tool”, then `Ctrl+Shift+P` → “Terminal: Kill All Terminals” and restart Cursor)?
- Can you record a short video or screenshots of three commands in a row with full terminal output?

Share the info - if the pattern confirms, I’ll pass it to the engineers with details about Git Bash + third command.

---

<div class="post-metadata">

**Author:** ![Syzygianinfern0](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Syzygianinfern0](https://forum.cursor.com/u/Syzygianinfern0)\
**Post date:** [December 1, 2025, 5:48pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/5 "2025-12-01T17:48:28Z")

</div>

On a sidenote, is it possible to make Cursor use zsh as its AI terminal?

---

<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:** [December 1, 2025, 6:13pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/6 "2025-12-01T18:13:50Z")

</div>

Thanks for the question about zsh. Agent Mode often ignores terminal profile settings and launches bash or PowerShell (especially on Windows). This is a known issue.

Could you please clarify:

- Are you using WSL (Ubuntu/Debian etc.) or native Windows with MSYS2/Cygwin/Git for Windows
- If WSL: which distro (Ubuntu, Debian, other)
- If native Windows: where is zsh installed (full path to the binary, e.g. `C:\msys64\usr\bin\zsh.exe`)

What works:

- You can switch the regular built-in Cursor terminal to zsh via Settings \> Terminal \> Default Profile or in settings.json:

For WSL:

```auto
{
  "terminal.integrated.defaultProfile.windows": "Ubuntu",
  "terminal.integrated.profiles.windows": {
    "Ubuntu": {
      "path": "C:\\Windows\\System32\\wsl.exe",
      "args": ["-d", "Ubuntu"]
    }
  }
}

```

For MSYS2/Cygwin:

```auto
{
  "terminal.integrated.defaultProfile.windows": "zsh",
  "terminal.integrated.profiles.windows": {
    "zsh": {
      "path": "C:\\msys64\\usr\\bin\\zsh.exe",
      "args": ["-l"]
    }
  }
}

```

What doesn’t work:

- The AI Agent may ignore these settings and force bash/PowerShell in most cases.

Temporary workaround:

- Use zsh in the regular terminal, and for Agent commands, temporarily stick with bash/PowerShell.
- For some users, disabling Shell Integration helps: `"terminal.integrated.shellIntegration.enabled": false` (but this might break other features).

Let me know these details and I’ll be able to help you.

---

<div class="post-metadata">

**Author:** ![FullPI](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FullPI](https://forum.cursor.com/u/FullPI)\
**Post date:** [December 1, 2025, 6:21pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/7 "2025-12-01T18:21:13Z")

</div>

`~/.bashrc` and `~/.bash_profile` do not exist.

This is not an issue with legacy terminal enabled.

It looks as described:

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

Note, I did not notice this when changing to v2, some update after v2 introduced this issue.

---

<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:** [December 1, 2025, 6:39pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/8 "2025-12-01T18:39:31Z")

</div>

Thanks, you’ve pinpointed the issue exactly: the third command in a row in Agent Mode with Git Bash on Windows triggers a `dump_bash_state` error.

This is a regression in the new agent terminal (post v2), specific to Git Bash on Windows.

Could you please share:

- Request ID (Privacy Mode disabled) from the chat menu (three dots) \> Copy Request ID. Instructions: [Getting a Request ID | Cursor Docs](https://cursor.com/docs/troubleshooting/request-reporting)

Share the Request ID, and I’ll pass it to the engineers with full details for a fix in the new agent terminal.

---

<div class="post-metadata">

**Author:** ![FullPI](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@FullPI](https://forum.cursor.com/u/FullPI)\
**Post date:** [December 2, 2025, 9:36am UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/9 "2025-12-02T09:36:52Z")

</div>

61402320-827b-4ad0-b3d9-ee91203c50fd

---

<div class="post-metadata">

**Author:** ![jubr](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jubr/32/53117_2.png) [@jubr](https://forum.cursor.com/u/jubr)\
**Post date:** [December 18, 2025, 12:25pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/11 "2025-12-18T12:25:17Z")

</div>

Jumping on the wagon here: I’m seeing the same issue on Mac OS with `brew`-served Bash 5.3.3. I have extensive Bash RC customization, which I’ve largely turned off when it detects that it’s running inside Cursor by checking `$CURSOR_TRACE_ID` or `$VSCODE_GIT_IPC_HANDLE`. The customization leaves tools like `mise` activated, so it can find the right binaries based on the working directory.

It looks like the `dump_bash_state` shell function gets undefined for some reason. It’s still hard to see where this is happening exactly.

---

<div class="post-metadata">

**Author:** ![SherlockShoe](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@SherlockShoe](https://forum.cursor.com/u/SherlockShoe)\
**Post date:** [January 7, 2026, 5:57pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/12 "2026-01-07T17:57:40Z")

</div>

Also experiencing this on windows with NixWSL.

I have many things in my .bashrc to add auto completion for some tools.

---

<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:** [January 29, 2026, 5:58pm UTC](https://forum.cursor.com/t/line-1-dump-bash-state-command-not-found/144675/14 "2026-01-29T17:58:33Z")

</div>

Closed on January 29, 2026, 5:58pm UTC

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