Telegram streamMode=off 仍泄漏工具报错:配合 suppressToolErrors 关闭中间噪声
问题/场景:即使 streamMode=off,exec 失败信息仍在 Telegram 可见。前置条件:Telegram 渠道启用且存在失败工具调用。实施步骤:设置 channels.telegram.streamMode=off 并复现 → 打开 messages.suppressToolErrors=true → 视需要改为 partial 仅保留 typing 体验 → 回归失败命令输出。关键配置:streamMode + suppressToolErrors。验证:仅看到最终助手回复。风险:过度抑制会降低排障可见性。来源:Issue #21202。
GITHUBDiscovered 2026-02-20Author mrfrankbot
Prerequisites
- Telegram channel is configured and you can edit gateway config safely.
- You have a reproducible failing tool command (for controlled regression testing).
Steps
- Set `channels.telegram.streamMode` to `off` and trigger a failing exec tool call to confirm leak.
- Enable `messages.suppressToolErrors: true` to suppress visible ⚠️ tool error payloads.
- Optionally set stream mode to `partial` if you still want typing preview without raw failures.
- Restart gateway and re-run failing command to verify only final assistant output is sent.
Commands
openclaw gateway restartopenclaw gateway statusopenclaw statusVerify
Telegram chat no longer receives intermediate exec error text when stream suppression is configured.
Caveats
- Suppressing tool errors can hide useful diagnostics; keep logs/audit enabled for operators.
- Root fix may require channel implementation patch; config workaround behavior can vary by version(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗