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
{{ message }}
Repository navigation
rotated stream segments with open task_update chunks render as errored in 4.40.0 #911
Summary
A native Slack stream that runs past streamSegmentMaxAgeMs is rotated onto a new message. When the stream carries structured task_update chunks with status: "in_progress", the retired segment renders in Slack with the red error indicator, because rotateSegment stops it without closing the open task.
Reproduction
createSlackAdapter({ agentView: true }) on 4.40.0, default streamSegmentMaxAgeMs.
thread.post(source) where source is an async generator yielding { type: 'task_update', id: 'work', title: 'Working', status: 'in_progress', details: '…' } every ~20 s for 10 minutes.
Observe the thread after the first rotation (~240 s).
Observed
The retired segment shows the red warning icon next to its title; the new segment continues normally with the replayed open task.
Expected
The retired segment settles cleanly (checkmark or neutral), since the work continues in the next segment.
Cause rotateSegment in packages/adapter-slack/src/index.ts calls segment.streamer.stop({ token, markdown_text?, session_status: 'processing' }) and sends no closing task_update for tasks still in_progress. Slack renders a stopped stream whose last task chunk is open as an error state. A stop that includes { type: 'task_update', id, status: 'complete' } for each open task before startNextSegment renders cleanly; verified by driving the same calls manually.
Activity
fix(slack): combine card text limits, stream message IDs, and rotatio…