In my case -- on Sonoma 14.5 -- I didn't get the
zsh: killed mkdir -m 700 -p "$SHELL_SESSION_DIR"
error when opening a terminal window. Instead, I got a message that `rbenv` could not be found
It turns out that something happened with the IT department's anti-virus / anti-malware application -- and all of a sudden the only permissible command line commands were those built into MacOS.
..I'm sure that it comes as no surprise that our IT helpdesk staff claim they did nothing in the days prior to this happening...
Homebrew and installed Homebrew apps were being automatically killed
...as was `vscode` -- installed from PKG / DMG -- IF ONE EXECUTED `vscode` FROM THE COMMAND LINE
...in comparison, if I ran Visual Studio Code by double-clicking the Application icon, IT WORKED JUST FINE
When I asked IT to disable our anti-virus / anti-malware app, all commands from the command line started working JUST FINE
So try disabling anything that might block applications:
- Anti-virus / anti-malware
- Group Policy (if joined to an Active Directory / AzureAD)
- IT administrative applications
- etc.
...and see if that fixes things...