Problem
When a voice message is received and successfully transcribed via CLI STT (parakeet/sherpa-onnx), the raw audio binary (OGG/Opus) is still injected into the model context alongside the transcript. The binary bytes render as CJK/garbage characters and consume massive amounts of context tokens.
A short 10-second voice message adds ~15KB of binary garbage to context. A 40-second voice causes context overflow and triggers safeguard compaction, effectively crashing the session.
Expected behavior
After successful audio transcription, the raw audio binary should not be passed to the model — only the transcript text. Claude (and most text models) cannot process raw OGG binary, so it's pure context waste.
Suggested fix
Add a config option like tools.media.audio.stripRawOnSuccess: true (or make it the default) that removes the raw audio attachment from the model context when transcription succeeds. The current behavior (Preserve original media delivery to the model (always)) makes sense for images (vision models can use them) but not for audio with text-only models.
Reproduction
- Configure CLI-based audio transcription (e.g., parakeet-stt via sherpa-onnx)
- Send a voice message via Telegram
- Observe webchat — raw binary appears as Chinese/CJK characters in the message
- Send a longer voice (40+ seconds) — context overflows and compacts
Environment
- OpenClaw 2026.1.29
- Model: Claude Opus 4.5 (text-only, no native audio input)
- STT: parakeet-stt (sherpa-onnx, CLI type)
- Channel: Telegram
Problem
When a voice message is received and successfully transcribed via CLI STT (parakeet/sherpa-onnx), the raw audio binary (OGG/Opus) is still injected into the model context alongside the transcript. The binary bytes render as CJK/garbage characters and consume massive amounts of context tokens.
A short 10-second voice message adds ~15KB of binary garbage to context. A 40-second voice causes context overflow and triggers safeguard compaction, effectively crashing the session.
Expected behavior
After successful audio transcription, the raw audio binary should not be passed to the model — only the transcript text. Claude (and most text models) cannot process raw OGG binary, so it's pure context waste.
Suggested fix
Add a config option like
tools.media.audio.stripRawOnSuccess: true(or make it the default) that removes the raw audio attachment from the model context when transcription succeeds. The current behavior (Preserve original media delivery to the model (always)) makes sense for images (vision models can use them) but not for audio with text-only models.Reproduction
Environment