fix: lower Telegram text fragment aggregation threshold from 4000 to 3600 chars#26264
Closed
Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix: lower Telegram text fragment aggregation threshold from 4000 to 3600 chars#26264Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…3600 chars Telegram splits structured messages (Markdown, heredoc) earlier than the 4096-char limit. With the previous 4000-char threshold, first fragments around ~3900 chars were not recognized as near-limit and subsequent parts were processed as separate messages. Lowering to 3600 ensures aggregation starts reliably for all content types that Telegram may split. Closes openclaw#26237 Co-authored-by: Cursor <cursoragent@cursor.com>
thebtf
pushed a commit
to thebtf/openclaw
that referenced
this pull request
Feb 25, 2026
openclaw#25988 - openclaw#26229: replace Agent with EnvHttpProxyAgent in global undici dispatcher so HTTP_PROXY/HTTPS_PROXY env vars are respected for all outbound fetch calls (regression fix from openclaw#25682 that overwrote proxy-aware dispatcher) - openclaw#26264: lower text fragment aggregation threshold 4000→3600 chars to reliably catch structured content that Telegram splits at ~3800 chars - openclaw#25988: fail closed group allowlist against DM pairing store — group sender checks now use only explicit groupAllowFrom config, not the DM pairing store (security: DM-paired senders cannot bypass group allowlist)
|
This pull request has been automatically marked as stale due to inactivity. |
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
###headings) earlier than the hard 4096-char limit. First fragments around ~3900 chars were not recognized as "near-limit" because the aggregation threshold was set at 4000 chars.TELEGRAM_TEXT_FRAGMENT_START_THRESHOLD_CHARSfrom 4000 to 3600 insrc/telegram/bot-handlers.ts.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Telegram long-message aggregation now triggers reliably for structured content that Telegram splits at ~3800-4000 chars, instead of only triggering when the first fragment exceeds 4000 chars.
Security Impact (required)
Repro + Verification
Environment
Steps
Expected
Actual (before fix)
Evidence
"aggregates fragments when first part is ~3900 chars"added and passingHuman Verification (required)
Compatibility / Migration
Failure Recovery (if this breaks)
src/telegram/bot-handlers.tsRisks and Mitigations
Greptile Summary
Lowered Telegram text fragment aggregation threshold from 4000 to 3600 chars to catch structured messages that Telegram splits earlier than the hard limit.
TELEGRAM_TEXT_FRAGMENT_START_THRESHOLD_CHARSconstant insrc/telegram/bot-handlers.ts:100Confidence Score: 5/5
Last reviewed commit: 0594daa