#12064: fix: prevent chunker from truncating messages that fit within limit
stale
## Bug
The message chunker introduced in 191da1feb unpredictably truncates messages mid-sentence on Signal, TUI, and other channels — even when the text fits within the channel's textChunkLimit.
## Root Cause
`sendTextChunks()` in `deliver.ts` always passes text through the chunker pipeline regardless of whether splitting is needed. The chunker can return partial/empty results for text that doesn't need chunking.
## Fix
1. **Skip chunking when text fits:** If `text.length <= textLimit`, send directly without invoking the chunker.
2. **Guard empty chunker output:** If chunker returns an empty array, send the original text intact instead of silently dropping it.
## Reproduction
Send any multi-paragraph message via Signal or TUI on v2026.2.6-3. Messages are randomly cut mid-sentence.
## Workaround
Add `"chunker": null` to each channel in openclaw.json.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Change is localized to `src/infra/outbound/deliver.ts` and adjusts outbound text delivery to avoid invoking the channel chunker when the text already fits within `textChunkLimit`, and to fall back to sending the original text if the chunker returns an empty array. This targets a regression where some chunkers could return partial/empty output and truncate messages even when no splitting was required.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk once the small cleanup is addressed.
- The change is narrow and preserves existing behavior except for skipping chunking when unnecessary and guarding empty chunker output. No new external dependencies or complex logic were introduced; the only actionable issue found is an unresolved placeholder reference in a new comment.
- src/infra/outbound/deliver.ts (comment cleanup)
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#10612: fix: trim leading blank lines on first emitted chunk only (#5530)
by 1kuna · 2026-02-06
78.3%
#7218: fix(telegram): skip empty text messages in threaded mode
by ArsalanShakil · 2026-02-02
77.0%
#21462: fix(agents): hold back partial NO_REPLY token in pi-embedded streaming
by algal · 2026-02-20
75.7%
#15853: feat: add option to suppress media placeholder text
by MisterGuy420 · 2026-02-14
75.1%
#19027: fix(feishu): keep chunked messages in topic/thread context
by qiangu · 2026-02-17
74.9%
#17769: fix(telegram): preserve reply text in threaded mode dispatch
by Glucksberg · 2026-02-16
74.8%
#12325: fix: trim leading/trailing whitespace from outbound messages
by jordanstern · 2026-02-09
74.7%
#17070: fix(telegram): Outbound: ignore empty legacy target fields
by yhw2003 · 2026-02-15
74.5%
#7353: fix: prevent silent message drops after config.patch restart
by 18-RAJAT · 2026-02-02
74.2%
#15985: fix(telegram): defer buffer deletion until processing succeeds
by coygeek · 2026-02-14
74.2%