mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
d73dd930af
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.
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.