-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Group chat session JSONL missing sender metadata (__openclaw / senderId) #90531
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.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.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.Can lose, corrupt, or silently drop user/session/config data.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
Priority
None yet
Summary
In group chat sessions, user messages stored in the agent session JSONL () are missing the
__openclawmetadata block that is present in 1:1 (direct) session messages.Expected behaviour
Group chat user messages should include sender identity metadata — at minimum
senderId/sender_id— so that agents can distinguish between different human participants in a group.In direct (1:1) sessions, user messages include a full metadata envelope:
{ "role": "user", "content": "...", "timestamp": 1780628953073, "__openclaw": { "from": { "id": "8489979671", "first_name": "Ram", "last_name": "Shenoy" }, "senderId": "8489979671" } }Actual behaviour
Group chat user messages contain only:
{ "role": "user", "content": "...", "timestamp": 1780628953073 }No
__openclawblock, no sender ID, no name.Impact
USERlabelContext
Discovered while implementing a group chat transcript/memory system for a Telegram group (Klub K: Ram + Garima + Purl bot). The Telegram gateway clearly has the sender identity at the envelope level (it is present in the inbound metadata delivered to the agent) — it is just not being persisted to the JSONL record.
Proposed fix
When writing a user message record to the session JSONL for a group chat session, include the same
__openclawmetadata block that is already present in direct session records. At minimum:Workaround
None currently. ID-to-name maps can be pre-coded in scripts, but without the ID in the JSONL the mapping cannot be applied.