You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/session.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Use `session.dmScope` to control how **direct messages** are grouped:
11
11
-`main` (default): all DMs share the main session for continuity.
12
12
-`per-peer`: isolate by sender id across channels.
13
13
-`per-channel-peer`: isolate by channel + sender (recommended for multi-user inboxes).
14
+
Use `session.identityLinks` to map provider-prefixed peer ids to a canonical identity so the same person shares a DM session across channels when using `per-peer` or `per-channel-peer`.
14
15
15
16
## Gateway is the source of truth
16
17
All session state is **owned by the gateway** (the “master” Clawdbot). UI clients (macOS app, WebChat, etc.) must query the gateway for session lists and token counts instead of reading local files.
@@ -42,6 +43,7 @@ the workspace is writable. See [Memory](/concepts/memory) and
42
43
- Multiple phone numbers and channels can map to the same agent main key; they act as transports into one conversation.
- If `session.identityLinks` matches a provider-prefixed peer id (for example `telegram:123`), the canonical key replaces `<peerId>` so the same person shares a session across channels.
45
47
- Group chats isolate state: `agent:<agentId>:<channel>:group:<id>` (rooms/channels use `agent:<agentId>:<channel>:channel:<id>`).
46
48
- Telegram forum topics append `:topic:<threadId>` to the group id for isolation.
47
49
- Legacy `group:<id>` keys are still recognized for migration.
@@ -86,6 +88,9 @@ Send these as standalone messages so they register.
86
88
session: {
87
89
scope:"per-sender", // keep group keys separate
88
90
dmScope:"main", // DM continuity (set per-channel-peer for shared inboxes)
// Default is already per-agent under ~/.clawdbot/agents/<agentId>/sessions/sessions.json
@@ -2297,6 +2300,8 @@ Fields:
2297
2300
-`main`: all DMs share the main session for continuity.
2298
2301
-`per-peer`: isolate DMs by sender id across channels.
2299
2302
-`per-channel-peer`: isolate DMs per channel + sender (recommended for multi-user inboxes).
2303
+
-`identityLinks`: map canonical ids to provider-prefixed peers so the same person shares a DM session across channels when using `per-peer` or `per-channel-peer`.
Copy file name to clipboardExpand all lines: docs/gateway/security.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ By default, Clawdbot routes **all DMs into the main session** so your assistant
133
133
}
134
134
```
135
135
136
-
This prevents cross-user context leakage while keeping group chats isolated. See [Session Management](/concepts/session) and [Configuration](/gateway/configuration).
136
+
This prevents cross-user context leakage while keeping group chats isolated. If the same person contacts you on multiple channels, use `session.identityLinks` to collapse those DM sessions into one canonical identity. See [Session Management](/concepts/session) and [Configuration](/gateway/configuration).
0 commit comments