buzz messages send accepts empty stdin and publishes blank event
Summary
buzz messages send --content - accepts empty stdin, signs the event, and the
relay stores a message with content: "". This creates an apparently successful
send (accepted: true) that renders as a blank message.
Observed twice with Buzz Desktop / CLI 0.5.11 on macOS arm64.
Reproduction
printf '' | buzz messages send \
--channel <channel-uuid> \
--content -
Actual result: exit 0 / accepted: true; relay event has an empty content
field.
Expected result: reject empty or whitespace-only effective content before signing/sending, return exit code 1 with a clear user error.
Evidence
Two independently accepted events on a self-hosted relay had empty bodies:
8d033799d9a69d3d6b6bd8e037042c08582a77f141aeb59e088defd6d8a906d4b3739164b6b89e71ea20b30cce1e60da17983d41cc688201f094d72411923e2d
In both cases, buzz messages thread returned "content":"". A direct send
using --content "non-empty text" produced a normal 131-character event, so
the relay did not truncate a non-empty body.
Suggested gate
After resolving --content (including reading stdin), validate
content.trim().is_empty() and fail before mention resolution, signing, or
relay submission. A regression test should cover EOF, zero bytes, newline-only,
and spaces-only stdin.
Reproduced on macOS arm64 with Buzz Desktop/CLI 0.5.17 and a managed ACP agent.
The agent produced a textual final response internally, then invoked buzz messages send ... --content - without a pipe/redirection supplying stdin. The command completed successfully and the thread received an event with no visible body.
This was confirmed against the current code path:
read_or_stdin("-")returns an empty string when stdin is EOF;cmd_send_messageonly applies the maximum-size validation before building and submitting the event;- the current unit test explicitly accepts empty content via
validate_content_size_empty.
I also added a local regression test for empty/whitespace text without media and a minimal guard in cmd_send_message that rejects it before mention resolution, signing, or relay submission. The full buzz-cli library suite passes locally (352 tests).
No user data, relay URL, event IDs, keys, tokens, or prompt content are included here.
Another independent reproduction, with the agent's own root-cause statement, which supports the gate proposed here.
Environment: Buzz Desktop (Linux AppImage), buzz-acp managed agents, self-hosted community relay. Two agents in the same channel: Claude via @agentclientprotocol/claude-agent-acp 0.66.0 and Codex via @agentclientprotocol/codex-acp 1.1.14.
Observed: four zero-byte kind-9 events in one channel tonight, all from the Codex agent, none from the Claude agent (checked 200 events: 71 Claude / 51 Codex / 78 human; only Codex had empties). Each blank landed ~15 s after a human @mention, i.e. the whole turn's answer was lost; a real answer only appeared after a second explicit prompt.
| event id | time (UTC) | author |
|---|---|---|
c50fef033b79077052d0cec018320833a9728804027e9082fdbd3701f48847af |
2026-08-28T00:42:56.000Z | Codex ef736497… (@agentclientprotocol/codex-acp 1.1.14) |
b128350bcd0af6feac6a1132ea6fca98341fbfa604e3a364027538c08221852c |
2026-08-28T03:35:00.000Z | Codex ef736497… (@agentclientprotocol/codex-acp 1.1.14) |
9018fc756ebbdde948a65710639c03915f68512ae7d5e57e5ef3b3e24c96bc46 |
2026-08-28T03:37:31.000Z | Codex ef736497… (@agentclientprotocol/codex-acp 1.1.14) |
0b4ba784d0cfa6d8de15847eff3808d9328ff892b7e17e60c6a6f42d67bf07d3 |
2026-08-28T03:39:20.000Z | Codex ef736497… (@agentclientprotocol/codex-acp 1.1.14) |
Root cause per the Codex agent itself (its words, in-channel): "In the failed turns I used --content - without reliably supplying the body through stdin, and one shell-constructed multiline command also failed before sending. Buzz accepted the event even when the content was empty, so the success response was not enough validation." That's exactly the missing gate this issue describes — accepted: true on an empty body is indistinguishable from success to an agent, so it never retries. |
Same symptom class as #5732; if the CLI rejected whitespace-only content before signing (exit 1, clear error), the agent would have seen a failure and re-sent. Happy to test a build.