sipeed/picoclaw · error
streaming disabled in config
Error message
streaming disabled in config
What it means
Guard behind BeginStream: the Telegram channel refuses to create a streamer because streaming is disabled in the channel's config. This is a deliberate feature gate, not a runtime failure — draft-message streaming was not enabled for this deployment.
Solutions
- Enable streaming in the telegram channel settings if draft-based streaming is desired
- Fall back to non-streaming message delivery (plain Send) when the streamer cannot be created
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/channels/telegram/telegram.go:1652 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/0328c17bc3ed2c06.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/channels/telegram/telegram.go:1652
return strings.EqualFold(mentionUsername, botUsername)
}
// stripBotMention removes the @bot mention from the content.
func (c *TelegramChannel) stripBotMention(content string) string {
botUsername := c.bot.Username()
if botUsername == "" {
return content
}
// Case-insensitive replacement
re := regexp.MustCompile(`(?i)@` + regexp.QuoteMeta(botUsername))
content = re.ReplaceAllString(content, "")
return strings.TrimSpace(content)
}
// BeginStream implements channels.StreamingCapable.
func (c *TelegramChannel) BeginStream(ctx context.Context, chatID string) (channels.Streamer, error) {
if !c.tgCfg.Streaming.Enabled {
return nil, fmt.Errorf("streaming disabled in config")
}
cid, threadID, err := parseTelegramChatID(chatID)
if err != nil {
return nil, err
}
streamCfg := c.tgCfg.Streaming.WithDefaults(3, 200)
return &telegramStreamer{
bot: c.bot,
chatID: cid,
threadID: threadID,
draftID: cryptoRandInt(),
throttleInterval: time.Duration(streamCfg.ThrottleSeconds) * time.Second,
minGrowth: streamCfg.MinGrowthChars,
}, nil
}
View on GitHub (pinned to 49183d7e8d)