Hey, thanks for the report and the logs. They show the root cause: the error ENOENT, syscall: 'spawn zsh', path: 'zsh' means the agent is trying to run commands via zsh inside the devcontainer, but you only have bash installed there. The spawn fails immediately, the agent gets empty output, and that’s why commands look like they’re hanging.
This is a known bug on our side. In some cases the agent shell is hardcoded to zsh and doesn’t respect the environment’s default shell. No ETA for a fix yet.
Workarounds, from most reliable to least:
Install zsh in the container. This is the most stable option. In your Dockerfile or postCreateCommand in .devcontainer/devcontainer.json:
apt-get update && apt-get install -y zsh
Enable Legacy Terminal Tool. Go to Cursor Settings, search for terminal, then enable Legacy Terminal Tool. It uses a different launch mechanism and usually respects the system SHELL.
Run critical commands manually in the integrated terminal. You have bash there so it works, then paste the result back to the agent in chat.
Let me know which option works for you, and if we have updates on the fix we’ll post them in this thread.
Hey @bleach3269,
Just checking in — are you still running into the shell command issue in devcontainers? We’ve shipped some terminal-related fixes since this was reported. If you’re still hitting it, let me know your current Cursor version and whether the workarounds from the earlier reply helped.
Hey @Yuxuan_Liu thanks for the detailed version info, and good to hear the Legacy Terminal Tool option sorted it out for you after a restart.
You’ve got it exactly right: this is the same issue. When the container’s shell setting points to zsh but only bash is installed, the agent’s shell fails to launch and commands come back empty. It’s a known issue, and your confirmation that it’s still happening on 3.7.12 is a useful data point for us.
For anyone else landing here, the two reliable fixes are:
Install zsh in the container — add apt-get update && apt-get install -y zsh to your Dockerfile or the postCreateCommand in .devcontainer/devcontainer.json.
Enable the Legacy Terminal Tool — in Cursor Settings, search for “terminal”, toggle it on, and restart Cursor (as Yuxuan found, the restart matters).