I am running Cursor 0.47.5, macOS, with zsh shell and oh-my-zsh.
When using agent mode, I find that often it seems like the command ending is not being detected. The built in terminal in the AI pane just seems to sit there. I have attached a screenshot.
I am not sure that if there is something with my .zshrc configuration that is causing this difficulty.
This definitely slows me down a lot. I cannot consistently reproduce this.
Zsh with oh-my-zsh but I tried telling it to switch into bash before running the command. I think maybe it has more to do with the structure of the output. It’s happening with long scripts or with running a test suite. I did try to asking it to put a watch word like “END OUTPUT” after the command but that didn’t help it.
+1 with the exact same problem. The solution of 2>&1 does nothing to address it. I do use zsh and p10k, so I suspect something might be interfering in there. But I don’t really know how to investigate what is happening
using bash and the same issue there.
it happened randomly. Mostly with command that take longer time. (like compile, but also happen on short command like ls…)
I am on WSL with zsh and oh-my-zsh and same problem. Also it routinely runs commands that succeed but is unable to see the results especially with pytest. and the command runs and I see the output in the agent window but Cursor fails to see it
This is a constant snag.
30% it works as expected
30% it doesn’t detect command exited
20% nothing shows up in the terminal at all but the agent can see the output; i have to guess when to hit cancel to proceed
10% nothing shows up and it doesn’t think anything ran
10% it terminates the command very quickly and then declares success before the command completed
Ask it to use some other specific shell command, or prefix/sufix/wrap any shell commands in another command, like sh/bash, or maybe run “exit” automatically after each shell instance
Press Ctrl+C or Ctrl+D after clicking the shell text, this might force terminate the shell terminal
Pop-out! This usually causes the Agent to believe it failed, maybe it will check if it’s done or try something else
I used the approach described in this thread to force bash instead of zsh and it is much more reliable now.
Definitely seems there’s something about zsh that throws the IDE or agent off.