Describe the Bug
I consistently run in Agent mode when coding. I have the agent run spec tests and help troubleshoot any issues that arise. I recently upgraded to Cursor v1. All of a sudden, the agent executes the terminal in the chat using /bin/bash
.
The actual Terminal works just fine. It loads the terminal using zsh as expected. It’s when the Agent runs terminal in the chat that it initiates it using /bin/bash
, as you’ll see below.
Steps to Reproduce
I actually had the agent try to pinpoint the issue and it had me run the following in the agent chat:
$SHELL -c 'echo "Default shell process: $0"'
which outputs:
USRLLM79Y0W6CQ:BCR-Web sknight$ $SHELL -c 'echo "Default shell process: $0"'
Default shell process: /bin/zsh
Then the agent had me run:
ps -p $$ -o pid,ppid,command
Which resulted in the following:
USRLLM79Y0W6CQ:BCR-Web sknight$ ps -p $$ -o pid,ppid,command
PID PPID COMMAND
99982 97769 /bin/bash --init-file /Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/contrib/
The agent then output the following:
But Cursor is still launching bash. This might be because:
1. Agent Mode Override: The AI agent terminal integration might be using a different configuration than the regular Cursor terminal
2. Cached Settings: Cursor might need a complete restart or settings reload
3. Agent-Specific Configuration: The AI agent might have its own terminal spawning logic
Then the agent asked me to run the following:
echo "SHELL env: $SHELL"
And the result:
USRLLM79Y0W6CQ:BCR-Web sknight$ echo "SHELL env: $SHELL"
SHELL env: /bin/zsh
And the agent’s response:
Interesting! The $SHELL environment variable is correctly set to /bin/zsh, which suggests your settings are being partially recognized, but the actual terminal process is still bash.
This indicates that Cursor's AI agent mode might have its own terminal spawning logic that overrides the regular terminal settings. The agent mode might be hardcoded to use bash for compatibility reasons.
The Solution
Since the AI agent mode seems to override your terminal settings, we should continue using the approach that works reliably: /bin/zsh -ilc 'command_here'
Expected Behavior
I have to say, this is highly annoying. It was working just fine prior to upgrading to v1.
I have added all of the integration settings in the settings.json
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.shellIntegration.enabled": false,
"terminal.integrated.profiles.osx": {
"zsh": {
"path": "/bin/zsh",
"args": ["-l"]
}
},
But that doesn’t seem to matter. It would be great if it honored the settings and opened the terminal using the expected settings. It could also open a terminal tab and run the expected commands rather than in the chat (like it does in vs code with co-pilot).
For now, the agent has recommended running commands using /bin/zsh -ilc 'command_here'
in the chat.
Screenshots / Screen Recordings
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.0.0 (Universal)
VSCode Version: 1.96.2
Commit: 53b99ce608cba35127ae3a050c1738a959750860
Date: 2025-06-04T19:21:39.410Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Does this stop you from using Cursor
No - Cursor works, but with this issue