-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[2026.5.18] Compaction safeguard causes duplicate messages on sessions_send interactions #84139
Copy link
Copy link
Closed
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: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:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.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:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.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:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.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
Bug Description
When compaction triggers during an active
sessions_sendexchange between two agents, the compaction safeguard replays the session branch messages after recovery, causing the same interaction to be sent twice to the target agent.Example scenario:
sessions_sendto 小蜂 (this agent)sessions_sendreply back to PMSteps to Reproduce
sessions_sendExpected Behavior
Each
sessions_sendinteraction should be delivered exactly once. Compaction should not cause duplicate delivery of messages that were already sent.Actual Behavior
Messages delivered via
sessions_sendare duplicated after compaction recovery. The safeguard appears to replay the session branch containing thesessions_sendinteraction, causing duplicate delivery.Gateway Log
Key line:
Compaction safeguard: using session branch messages after compaction preparation omitted real conversation content.The safeguard falls back to branch messages when real content is omitted during compaction preparation, but this replay includes already-sent
sessions_sendinteractions.Environment
Additional Context
sessions_sendinteractions, not direct user↔agent messages