-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Feature: groupScope option to consolidate group sessions into main #7524
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
Currently, all group chats are always isolated into their own sessions via the session key format:
agent:${agentId}:${channel}:${peerKind}:${peerId}(session-key.js line 130). There is no equivalent ofdmScope: "main"for groups.This means users cannot have a group chat consolidated into their main session for unified context, even when they want to.
Use Case
A user wants their family iMessage group chat to land in the same session as their DMs, so the agent has full conversational context across both. The agent can already differentiate DM vs group from the envelope metadata (
ChatType,From,GroupSubject, etc.), so routing replies correctly is not an issue.Meanwhile, other groups (e.g., a friend's group chat) should remain isolated.
Proposed Solution
Add a
groupScopeoption (similar todmScope) that controls whether group sessions consolidate or isolate:Values:
"isolated"(default): Current behavior, each group gets its own session"main": Route to the agent's main session (likedmScope: "main"does for DMs)Context
Discovered while migrating from
imsg(legacy iMessage) to BlueBubbles. The imsg channel had a quirk where unconfigured groups weren't detected as groups (is_group: false), so they accidentally consolidated. BlueBubbles correctly reportsisGroup: truevia chat GUID format (;+;= group), which exposed the missing feature.Affected Code
dist/routing/session-key.js-buildAgentPeerSessionKey()line ~130dist/routing/resolve-route.js-buildAgentSessionKey()