I can’t speak for VSC specifically (I don’t like their terminal emulator so don’t have enough experience using it) but I do know some other applications “paste” (for want a better word) commands into the script interactive shell because they purpose of the shell being open is to provide a REPL and the GUI application just provides a few useful graphical hooks to it.
Regarding the history problem, there’s likely a flag VSC can pass to Zsh to disable writing to history for that session.
Regarding the history problem, there’s likely a flag VSC can pass to Zsh to disable writing to history for that session.
Edit: looks like there are several ways: https://unix.stackexchange.com/questions/692913/temporarily-...