Files
openclaw/extensions/sms
Masato Hoshino d73dd930af fix(sms): reject a zero SMS_TEXT_CHUNK_LIMIT instead of sending one text per character (#118158)
SMS_TEXT_CHUNK_LIMIT is the documented environment fallback for
channels.sms.textChunkLimit. parseTextChunkLimit validates that field on two
paths and only guards one: the numeric branch requires raw > 0, while the string
branch the environment fallback uses ended in
parseStrictInteger(raw.trim()) ?? DEFAULT_TEXT_CHUNK_LIMIT, and 0 ?? 1500 is 0.
SmsChannelConfigSchema already declares z.number().int().positive() for the
config key, so the invariant existed and only the env path skipped it.

The unvalidated limit reaches the plugin's own chunkSmsPlainText, which returns
one chunk per character, and the send loop issues one Twilio request per chunk.
Measured on the real outbound path, a 9,528-character reply produced 7,550
single-character send requests. resolveSmsTextChunkLimit hides this from core
with account.textChunkLimit || fallbackLimit || 1500 while the plugin keeps the
raw 0.

Parse that branch with parseStrictPositiveInteger. Negative, fractional and
non-numeric values were already rejected by the surrounding regex and still fall
back to the default; 0 is the only input whose behavior changes.
2026-08-02 18:09:22 -07:00
..
2026-06-04 21:02:07 -04:00

SMS OpenClaw channel

Official OpenClaw channel plugin for SMS.

Install

openclaw plugins install @openclaw/sms

Docs

See docs/channels/sms.md in the OpenClaw repository, or the published docs at https://docs.openclaw.ai/channels/sms.