fix(discord): bound standalone response reads - #55209
Closed
ooiuuii wants to merge 1 commit into
Closed
Conversation
This was referenced Jun 30, 2026
tonydwb
reviewed
Jun 30, 2026
tonydwb
left a comment
There was a problem hiding this comment.
LGTM. Clean 2-file fix bounding Discord standalone response reads to prevent OOM. Consistent with the 8KB limit pattern applied across Slack, WhatsApp, Google Chat, LINE, and Teams adapters.
This was referenced Jul 7, 2026
Contributor
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
resp.json()/resp.text()on real streamed responsesFixes #55208
Validation
python -m pytest tests\tools\test_send_message_tool.py::TestSendDiscordThreadId -q --basetemp .tmp-pytest-discord-thread— 6 passedpython -m pytest tests\tools\test_send_message_tool.py::TestSendDiscordThreadId tests\tools\test_send_message_tool.py::TestSendDiscordMedia -q --basetemp .tmp-pytest-discord-send— 12 passedpython -m pytest tests\tools\test_send_message_tool.py -q --basetemp .tmp-pytest-send-message-tool— 151 passedpython -m ruff check plugins\platforms\discord\adapter.py tests\tools\test_send_message_tool.py— passedgit diff --check— passedNotes
This was found while checking recent OpenClaw response-body cap fixes for analogous Hermes surfaces. Hermes does not have the exact OpenClaw PluralKit / Discord voice upload URL code path; the matching Hermes boundary is the standalone Discord REST sender used when no live gateway adapter is available.
AI-assisted: implementation, tests, and validation summary were prepared with Codex.