Skip to content

Telegram channel: set parse_mode for formatted messages #2511

Description

@wiselancer

Summary

When ZeroClaw sends messages via the Telegram Bot API, it does not set the parse_mode parameter in sendMessage requests. This causes all formatting (bold, italic, code blocks, etc.) to be displayed as literal text rather than rendered.

Environment

  • ZeroClaw version: 0.1.1
  • Mode: daemon (with Telegram channel enabled)
  • Model: openai-codex/gpt-5-codex

Steps to Reproduce

  1. Configure ZeroClaw with a Telegram bot channel enabled
  2. Send a message that triggers a response containing formatting (e.g., *bold*, _italic_, `code`)
  3. Observe the Telegram message — formatting characters appear literally instead of being rendered

Expected Behavior

Messages should be rendered with proper formatting in Telegram. The sendMessage API call should include parse_mode set to MarkdownV2 (or HTML), so that Telegram renders bold, italic, code, etc.

Current Behavior

ZeroClaw sends messages without parse_mode, so Telegram treats the entire message as plain text. For example:

  • *bold* appears as *bold* instead of bold
  • `code` appears as `code` instead of code

Suggested Fix

Add a parse_mode field to TelegramConfig (defaulting to MarkdownV2) and include it in all sendMessage API calls:

[channels_config.telegram]
enabled = true
bot_token = "..."
parse_mode = "MarkdownV2"  # or "HTML"

Workaround

Adding a SOUL.md workspace file instructing the model to avoid formatting helps partially, but the model still uses *bold* and _italic_ which won't render without parse_mode.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions