Weird behaviour with the fish shell

When using agent mode with Claude 3.7, Cursor tries to execute commands, but for some reason it looks like it uses the “fish” shell for the terminal commands, and somehow the terminal escape codes, possibly for setting text color, are added to the actual shell commands, which makes them fail:

My shell on that system was fish when I started, but after I started seeing these errors (they didn’t appear at first - only after a few hours of prompting with Cursor), I’ve changed the shell to bash. This didn’t help - the terminal as shown in Cursor is still using fish (the screenshot shows the fish prompt).

This is basically making all commands requested by the agent fail.

Looks like there might be 2 bugs:

  1. Why is the agent terminal still using fish when my login shell was changed to bash?
  2. Why are the terminal escape sequences being sent as parts of the command?

This is a Python Django project, nothing special about it - it was basically created 99% by Cursor.

Edit: It looks like the problem with the escape sequences happens when fish tries to offer a type-ahead autocomplete option for the command line. You can see it as the gray text that appears AHEAD of the terminal cursor in this video: https://youtu.be/dRdGq8khTJc?t=346 . This would all be avoided if the terminal just used bash :smiley:

Edit 2: Found some VSCode shell settings, and after switching those to bash, and restarting Cursor, now the Cursor terminal is using bash, and doesn’t have the terminal code issues.