Clawith icon indicating copy to clipboard operation
Clawith copied to clipboard

会话支持隔离吗?因为好像不同的人跟同一个agent对话,是可以干扰他去删除其他人的对话内容的

Open 287573145 opened this issue 7 months ago • 4 comments

287573145 avatar Apr 06 '26 04:04 287573145

Thanks for raising this concern. We reviewed the codebase and here is our analysis:

Chat sessions ARE isolated per user

The current implementation already enforces user-level isolation on chat sessions:

  • WebSocket connection: If a session belongs to user A, user B cannot connect to it (rejected with code 4003).
  • Session listing: Each user only sees their own sessions (scope=mine filters by user_id).
  • Session deletion: Only the session owner (or admin) can delete a session (403 for others).
  • Message viewing: Same ownership check — non-owners get 403.

So one user cannot directly read, modify, or delete another user's chat messages.

What might feel like "interference"

That said, there are shared resources across users when talking to the same agent:

Resource Shared? Impact
Chat sessions & messages No — per-user isolated Safe
Agent workspace (files) Yes — shared across all users User A can ask the agent to create a file, user B can ask the agent to delete it
Agent memory & agenda Yes — global per agent User A's conversation may update the agent's memory, affecting how it responds to user B
Agent configuration Yes — managed by admin/creator N/A

Could you help us understand?

To better address your concern, could you describe the specific scenario you encountered?

  1. Which content was affected? Was it chat messages that disappeared, or files/data that the agent was working on?
  2. What roles do the users have? (Admin users can view/delete all sessions by design — this is intentional for management purposes.)
  3. Were multiple users chatting with the same agent at the same time?

This will help us determine whether this is a genuine isolation bug or expected behavior from shared agent resources. If it turns out to be about workspace/memory isolation, that's a valid feature request we can discuss separately.

wisdomqin avatar Apr 06 '26 15:04 wisdomqin

Image
资源 共享? 影响
代理工作区(文件) 是 — 在所有用户间共享 用户 A 可以请求代理创建文件,用户 B 可以请求代理删除它
代理内存与议程 是 — 每个代理的全局范围 用户 A 的对话可能会更新代理的内存,从而影响其如何回应用户 B

这2点目前是解决不了的吗?

287573145 avatar Apr 06 '26 23:04 287573145

It's not a matter of whether it can be solved — this is just our current design. Having said that, the requirement you mentioned is something we can consider. For example, the agent could have its own public memory and workspace, and also maintain per-user memory and per-user workspace that are isolated from each other.

wisdomqin avatar Apr 07 '26 13:04 wisdomqin

谢谢,非常期待更多的特性展示

287573145 avatar Apr 08 '26 00:04 287573145