Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
The agent cannot execute certain commands. When the command is executed, it immediately fails with a return code of -1. This does not happen with all commands; it generally occurs with pipes and sequential executions. For example, while the “go version” command works, the “cd ~/Projects/test && go version” command does not. The agent keeps adding “cd” to the beginning of commands, so it cannot execute any commands and behaves erratically.
Steps to Reproduce
When I open the Cursor, I tell the agent to run the command “cd ~/Projects/test && go version” and I get this error again.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.3.41
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0
Additional Information
For my zshrc configuration, I add configurations below, but the behaviour does not change.
# ~/.zshrc — disable Powerlevel10k when Cursor Agent runs
if [[ -n "$CURSOR_AGENT" ]]; then
# Skip theme initialization for better compatibility
else
[[ -r ~/.p10k.zsh ]] && source ~/.p10k.zsh
fi
also
# ~/.zshrc — disable Powerlevel10k when Cursor Agent runs
if [[ -n "$CURSOR_AGENT" ]]; then
# Skip theme initialization for better compatibility
else
[[ -r ~/.p10k.zsh ]] && source ~/.p10k.zsh
fi
and
if [[ -n "$CURSOR_AGENT" ]]; then
else
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
fi
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor