-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Inbound message envelope header truncates message body, causing model confusion #67503
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
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.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.staleMarked as stale due to inactivityMarked as stale due to inactivity
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.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.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
The inbound message envelope format includes the message body twice:
System:header line (truncated to 160 chars)This causes the model to sometimes reference the truncated header instead of the full message, leading to incorrect responses like "your message got cut off at 'day o'" when the full message was actually delivered.
Example
Note: "day o" in header vs "day of tasks" in full body.
Root Cause
Found in
extensions/slack/src/monitor/message-handler/prepare.tslines ~610-622:The system event enqueues a truncated preview (160 chars) into the event queue, which appears in the
System:header. The full message body is delivered separately in the user turn.Same pattern exists in:
extensions/msteams/src/monitor-handler/message-handler.ts(~line 494)extensions/mattermost/src/mattermost/monitor.ts(~line 1375)Proposed Fix
Remove the message content from the system event entirely. The system event's purpose is notification ("a message arrived"), not content delivery.
Before:
After:
This eliminates the duplicate/truncated content while preserving the notification functionality.
Impact
Environment