fix(slack): remove redundant thread starter wrapper and system event preview#27654
Closed
sourman wants to merge 2 commits intoopenclaw:mainfrom
Closed
fix(slack): remove redundant thread starter wrapper and system event preview#27654sourman wants to merge 2 commits intoopenclaw:mainfrom
sourman wants to merge 2 commits intoopenclaw:mainfrom
Conversation
… sessions Thread history and thread starter were being included on every message in a thread, not just the first message. This caused significant token bloat since the session transcript already maintains the full conversation history. Changes: - Only fetch ThreadHistoryBody for new thread sessions (when !threadSessionPreviousTimestamp) - Only include ThreadStarterBody for new thread sessions (existing sessions already have it in their transcript) This fixes the issue where: - First message: Gets "[Thread history - for context]" with full thread (correct) - Subsequent messages: Were getting "[Thread starter - for context]" redundantly (now fixed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
86bfdf6 to
5157c8e
Compare
Further reduces token bloat while preserving context for multi-human threads: 1. [Thread starter - for context] wrapper - The thread starter is already included in the [Thread history - for context] on the first message, and the session transcript maintains context for subsequent messages. 2. Verbose system event reduced to simple sender preamble - Changed from "System: [timestamp] Slack message in #channel from Sender: preview" to just "Slack message from Sender" for clean sender identification in multi-human threads. Result: Messages now show clean sender context without redundant metadata: - Before: "[Thread starter - for context]\nstarter\n\nSystem: [timestamp] Slack message in #channel from Sender: preview\n\nactual message" - After: "Slack message from Sender\n\nactual message" For the first message in a new thread session, full thread history is provided. Related to openclaw#27609 (initial fix for thread history bloat) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5157c8e to
283d2fe
Compare
This was referenced Feb 27, 2026
Contributor
Author
|
Addressed in #29067 - session-based sticky routing + context bloat fixes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[Thread starter - for context]wrapper (thread starter is already in the thread history)Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Before this PR (after #27609):
After this PR:
For the first message in a new thread session, full thread history is provided:
This preserves sender context for multi-human threads while removing verbose metadata.
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
~/.openclaw/agents/main/sessions/[Thread history - for context]with full thread[Thread starter - for context]wrapper appearsAI-Assisted PR
This PR was developed with Claude Sonnet 4.6. I understand the changes and have verified they reduce token bloat while preserving sender context for multi-human threads.
Combined impact of #27609 + this PR:
[Thread starter - for context]wrapper and reduces verbose system events to simple sender preamble