I think running claude code in the terminal is basically the mainframe era where everyone shared the same OS, which wasn't a good security but that what we had. and the solution to that is for each agent to run with its own identity, permissions and environment - so doing a bit of self-promotion but wrote about it here -
https://kosem.ai/blog/introducing-kosem-agents-with-identity...