When Cursor’s Agent runs terminal (agent’s terminal, not regular one), several problem occur
the current directory is not the project working dir, but the OS root (i.e. ‘/’)
most of commands fail with “–: dump_bash_state: command not found”. Many commands print also other errors:
$ ps aux | grep -E “(npm|node|next)” | grep -v grep
–: eval: line 1: unexpected EOF while looking for matching `)’
–: eval: line 2: syntax error: unexpected end of file
–: dump_bash_state: command not found
For some reason the terminal became read-only with this version: “Agent terminals are read-only”
If I run them in a regular cursor’s terminal session or in a separate terminal - they run fine. It happens only in the agent’s terminal session
Steps to Reproduce
ask agent in the chat to run pwd command:
USER: “run pwd command”
AGENT:
I’ll run the pwd command again to show the current working directory.
$ pwd
–: eval: line 1: unexpected EOF while looking for matching `)’
–: eval: line 2: syntax error: unexpected end of file
–: dump_bash_state: command not found
It looks like there was an issue with the shell. Let me try running the pwd command again:
$ pwd
/
–: dump_bash_state: command not found
So, it ran the same command twice, and the second time it executed (also printed the dump_bash_state error
Expected Behavior
current dir - project root, not OS root
no failures, no errors
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hi, thanks for reporting this issue! We’re looking into it. Would you mind sharing whether this is still occurring on the latest release? Also, are you seeing this when working in local workspaces on your Mac, or is this happening in a remote (ssh or container) workspace?
Hi, Thanks for looking into it. I have 1.6.23 and when I press check for update it says “There are currently no updates available.” - so I’m assuming it’s the latest release?
It’s in local workspace on my Mac, it’s neither remote nor container.
Ok, the update just became available and I installed it (1.6.26) and can confirm, that the issue still persist in the latest release
$ pwd
--: eval: line 1: unexpected EOF while looking for matching `)'
--: eval: line 2: syntax error: unexpected end of file
--: dump_bash_state: command not found
This has been reported yet. External terminal is not available anymore, they replaced it by agent terminals which are not capable of many things. Solution for now is downgrade to v1.5
For now, if you want, can say to your agent that use this “wrapper” sign.
/bin/zsh -c “….”
This command allow to your agent to run all terminal command from ZSH terminal, into you common terminal, can change this for another terminal if you preferrer.
Say in the start of the request that he/her need to use this command because the IDE is stock, and voila! Your terminal is back again (i guess more or less )