Cursor 2.0.77 Agent returns command not found for all CLI commands (macOS, zsh)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hi everyone,

I’m having a serious issue with the Cursor Agent. Whenever the Agent tries to run any terminal command, it fails with errors like these:

zsh:1: command not found: cat
(eval):1: command not found: npm
zsh:1: command not found: dump_zsh_state

Basically, almost no CLI command works inside the Agent, even though everything works perfectly fine in my normal macOS terminal and in the regular integrated terminal inside Cursor.

The strange part is:

:check_mark: This issue only happens in Cursor 2.x
:check_mark: When I downgrade to Cursor 1.5, the Agent works normally.

Summary of the issue:

cat, npm, and many other basic commands fail inside Cursor Agent.

I also get this error specifically:

zsh:1: command not found: dump_zsh_state

These commands do work:

In my macOS terminal

Inside Cursor’s normal terminal

They do not work:

When the Agent tries to execute them

Everything behaves correctly in Cursor 1.5, so this seems like a regression in 2.0.77.

Steps to Reproduce

Ask the Agent to do anything that requires running a CLI command, for example:

“Run the tests”

“Run npm install”

“Show me the contents of this file” (which makes it call cat)

The Agent then fails and returns errors like:

zsh:1: command not found: cat
(eval):1: command not found: npm
zsh:1: command not found: dump_zsh_state

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
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.0.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This looks related to the new terminal implementation in Cursor 2.x. There is a known workaround that has already helped in similar cases:

Try enabling the Legacy Terminal Tool:

  1. Open Cursor Settings Cmd+Shift+J
  2. Go to the Agents tab → find “Inline Editing & Terminal”
  3. Enable “Legacy Terminal Tool”
  4. Press Cmd+Shift+P → select “Terminal: Kill All Terminals”
  5. Fully restart Cursor
  6. Test Agent commands again

This will bring back the previous terminal implementation that was used in v1.5.

In v2.0, the new terminal has known issues with PATH and shell profile loading on both macOS and Windows. The team is already working on improvements for v2.1.

Let me know if this fixes the issue!

Thanks for the detailed reply and workaround!

I tried the suggested steps, but unfortunately the issue is still happening:

  1. Opened Cursor Settings with Cmd+Shift+J

  2. Went to Agents → Inline Editing & Terminal

  3. Enabled “Legacy Terminal Tool”

  4. Pressed Cmd+Shift+P → ran “Terminal: Kill All Terminals”

  5. Fully quit and restarted Cursor

  6. Tried using the Agent again

But I still get the exact same errors for any CLI command the Agent tries to run, for example:

zsh:1: command not found: cat
(eval):1: command not found: npm
zsh:1: command not found: dump_zsh_state

A few more details:

  • The integrated terminal in Cursor works fine (I can run cat, npm, etc. manually).

  • The problem only happens when the Agent executes commands.

  • If I go back to Cursor 1.5, the Agent works normally again with the same shell and same project.

  • I confirmed that Legacy Terminal Tool is still enabled while testing.

Is there anything else I can try, or any logs you’d like me to collect (e.g. from Developer Tools → Console) to help debug this?

Let me know what info would be most useful.

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