Cursor Agent cannot use shell properly

I added more information here. Managed to solve it by commenting out my .bash_profile file.