Summary
When the Telegram adapter sends a message containing a markdown blockquote (> ...) with any MarkdownV2 special character on that line (e.g. a trailing .), Telegram rejects the message with:
400: Bad Request: can't parse entities: Character '.' is reserved and must be escaped with the preceding '\'
The message is then re-sent as plain text via the existing fallback path, so the user still gets the content — but every workflow that emits a blockquote-containing notification (e.g. workflow start banners that quote the workflow's description:) loses its formatting and logs a telegram.markdownv2_failed warning.
Root cause
packages/adapters pins telegramify-markdown@^1.3.0, which currently resolves to 1.3.2. That version has a bug in blockquote handling: it escapes the > marker (it shouldn't — Telegram MarkdownV2 supports native > blockquotes) and it double-escapes any other special character on the same line.
Minimal reproduction
import telegramify from 'telegramify-markdown';
console.log(JSON.stringify(telegramify('> blockquote.', 'escape')));
Output on 1.3.2:
"\\> blockquote\\\\.\n" // → literal: \> blockquote\\. (INVALID — double backslash before .)
Output on 1.3.3:
"> blockquote\\.\n" // → literal: > blockquote\. (VALID)
The fix landed upstream in telegramify-markdown@1.3.3.
Real-world trigger
archon-adversarial-dev's description starts with a blockquote line ending in a period. When the workflow starts, Archon sends a 🚀 *Starting workflow* … notification that includes that description. The bot logs:
"telegram.markdownv2_failed"
"originalPreview": "🚀 **Starting workflow**: `archon-adversarial-dev`\n\n> \"adversarial build\", \"build app adversarially\", \"adversarial coding\"."
"formattedPreview": "🚀 *Starting workflow*: `archon-adversarial-dev`\n\n\\> \"adversarial build\"…\\\\."
Any workflow whose description: contains > plus a period (or any other escapable char) on the same line will hit this.
Suggested fix
Bump the dependency in packages/adapters/package.json:
- "telegramify-markdown": "^1.3.0"
+ "telegramify-markdown": "^1.3.3"
…and run bun update telegramify-markdown to lock 1.3.3 (or newer) into bun.lock.
A regression test in packages/adapters/src/chat/telegram/markdown.test.ts for the blockquote-with-special-chars case would prevent this from coming back if the dependency loosens later:
it('escapes special chars exactly once inside blockquotes', () => {
expect(convertToTelegramMarkdown('> hi.')).toBe('> hi\\.\n');
});
Environment
- Archon
dev branch (commit 536584db)
- macOS 15.x (Darwin 25.3.0), arm64
- Bun 1.3.11
telegramify-markdown@1.3.2
Summary
When the Telegram adapter sends a message containing a markdown blockquote (
> ...) with any MarkdownV2 special character on that line (e.g. a trailing.), Telegram rejects the message with:The message is then re-sent as plain text via the existing fallback path, so the user still gets the content — but every workflow that emits a blockquote-containing notification (e.g. workflow start banners that quote the workflow's
description:) loses its formatting and logs atelegram.markdownv2_failedwarning.Root cause
packages/adapterspinstelegramify-markdown@^1.3.0, which currently resolves to1.3.2. That version has a bug in blockquote handling: it escapes the>marker (it shouldn't — Telegram MarkdownV2 supports native>blockquotes) and it double-escapes any other special character on the same line.Minimal reproduction
Output on
1.3.2:Output on
1.3.3:The fix landed upstream in
telegramify-markdown@1.3.3.Real-world trigger
archon-adversarial-dev's description starts with a blockquote line ending in a period. When the workflow starts, Archon sends a🚀 *Starting workflow* …notification that includes that description. The bot logs:Any workflow whose
description:contains>plus a period (or any other escapable char) on the same line will hit this.Suggested fix
Bump the dependency in
packages/adapters/package.json:…and run
bun update telegramify-markdownto lock 1.3.3 (or newer) intobun.lock.A regression test in
packages/adapters/src/chat/telegram/markdown.test.tsfor the blockquote-with-special-chars case would prevent this from coming back if the dependency loosens later:Environment
devbranch (commit536584db)telegramify-markdown@1.3.2