In short, terminal commands stopped working after switching from Claude-4.5 to GPT-5 (persists even after switching back)
Terminal commands (like rvm ls, nvm ls) worked perfectly until a few days ago when I decided to switch to model GPT-5, then immediately started failing with errors like parameter not set or not finding Rails. Switching back to Claude-4.5 didn’t fix it - the issue persists regardless switching back or any other model. It looks like something got corrupted/messed up when I switched to GPT-5
Based on Claude-4.5 investigation, the terminal now spawns in non-interactive mode and doesn’t source shell initialization files (~/.zshrc), breaking version managers (RVM, nvm, asdf) and other tools.
Commands work fine in iTerm but fail when run by the AI.
Steps to Reproduce
I just ask the agent run any command that requires rvm being initialized
Expected Behavior
Terminal should work as it did before the model switch.
Disclaimer: I tested very briefly and chat Claude said is true - .zshrc isn’t run by the Agent spawned terminal. I don’t know if it would happen previously or not tho.
HOWEVER, I do know what everything started to stop working (after 7 months of daily Cursor usage) as soon as I switched the model to gpt-5 and never again worked. So something on the model switch caused a bug on my end
Hey, thanks for the report. This is definitely a weird one - the model switch shouldn’t affect how terminals are spawned, but I understand how frustrating this must be after 7 months of smooth usage
The issue you’re describing where the AI-spawned terminal doesn’t source .zshrc is actually expected behavior - Cursor’s AI runs commands in non-interactive shells by default, which don’t load your shell initialization files. This is why tools like rvm, nvm, and asdf aren’t available
A few things to try:
Source your shell file explicitly - you can ask the AI to run source ~/.zshrc && your_command
Check your Cursor terminal settings - go to Settings → Terminal and make sure your shell is set correctly
Try the workaround - some users add their PATH exports to .zprofile instead of .zshrc since that gets loaded in non-interactive shells
The timing with the GPT-5 switch is probably coincidental - maybe something else changed in your setup around the same time?
Let me know if sourcing the shell file manually works for now
This is why tools like rvm, nvm, and asdf aren’t available
First of all, I quickly checked and VsCode runs rvm commands just fine - I guess it may be bc it’s not a background spawned terminal or smth like that (?)
By now I’m completely hopeless to find a fix to be honest… I tried all of your suggestions and nothing worked
This is the last thing I tried - and failed:
If this can’t be fixed I guess I’ll need to spend some time checking if I can migrate back to VsCode since I can’t afford wasting time dealing with Cursor issues/corruption overnight
Before giving up I decided to do one final test: reinstall rvm.
I completely wiped it out, deleted all traces and references to rvm in dotfiles and then installed rvm again… IT WORKED
This is why tools like rvm, nvm, and asdf aren’t available
This comment of yours got me ngl, and I’d say it was quite misleading bc it almost made me give up of Cursor. I don’t know how or why, but it does work
Either ways, thank you so much for your help and assistance!