Claude Code会话被曝可跨目录协作
一名 Reddit 用户称,同一机器上不同目录运行的 Claude Code 会话能够自动相互发现并协调,包括在机器资源紧张时协商 CPU 资源。该用户还表示,Claude 称存在用于列出和发送消息给其他实例的内置工具,而同一 Mac 上以不同用户账户运行的会话无法看到彼此。
这表明 Claude Code 可能具备会话间协调和隔离边界,可能影响多个编程智能体会话共享本地资源的方式,但这一行为尚未得到验证。
I just discovered that Claude Code instances running in completely different directories on my machine automatically discover each other and coordinate. I'm not sure when this was introduced, but it was quite surprising to me. I'm going to have to think through the implications.
The full story: I run several simultaneous CC sessions across different work and personal projects. My machine is often saturated, and as I was watching a session work, it suddenly said it was negotiating with another operator for CPU. What? Who now?
At first I thought they found the PIDs of other instances, but after some conversation Claude told me it actually has a built-in tool to list and message the others. They refer to themselves based on the working directory where I started CC, adding a numbered suffix if I have multiple in the same dir.
In this case, the outcome was great: they are working together to optimize the use of my overworked CPU. Definitely something I want.
At the same time, I had been assuming everything was isolated. No longer true. FWIW I also run sessions as different users on my Mac, and it confirms it cannot see the sessions from the other users, so that seems like a good boundary if you want isolation.
I figured I'd share, since this was quite the surprise for me. Thought people should know.
submitted by /u/mrothro [link] [comments]