Windsurf terminal exit with code 130
I use Windsurf for some of my Coding projects. Thanks to their generous student plan and their unique features like Codemaps and DeepWiki which I find useful. However, I had been battling their Code agent called Cascade when it is running on terminal commands returning code 130 for all commands, but I don't get this with other CLI tools I tried or GitHub Copilot agent.
After some digging, I found that the issue is actually related to my oh-my-zsh configuration. I use zsh as my default shell and oh-my-zsh as my framework.
And the solution is simply to let Cascade use bash instead of zsh.
To do this we can modify the user settings in Windsurf in JSON format.
Open Windsurf, go to Settings > User Settings and add the following lines:
"terminal.integrated.profiles.osx": ,
"terminal.integrated.defaultProfile.osx": "bash"
This will set the default terminal profile to bash and also ensure that it does not load any profile or rc files which might interfere with the terminal commands.
Other solutions that can be used can be to use a conditional load of oh-my-zsh in the .zshrc file based on the terminal type like iTerm2 or others, but I'm a moody person and would sometimes switch between iTerm2 and other terminal emulators, so I prefer the first solution and not to pollute my .zshrc file with conditions for different terminal emulators.