Summary
When a cron job is configured to deliver to a Telegram Forum topic that restricts posting (e.g. topic:1 / General), the bot receives a 403: Forbidden: bot was kicked from the supergroup chat error. This message is identical to the error when the bot is actually removed from the group, making root cause analysis extremely difficult.
Steps to Reproduce
- Create a Telegram Forum group (with Topics enabled)
- Configure a cron job with
delivery.to = "<chatId>:topic:1" (General topic)
- Ensure the General topic has posting restricted to admins only (Telegram default)
- Trigger the cron job
Actual Behaviour
403: Forbidden: bot was kicked from the supergroup chat
lastError: "cron announce delivery failed"
The bot is still a member of the group and responds normally to direct messages. Only cron delivery fails.
Expected Behaviour
The error message should distinguish between:
- Bot actually removed from the group
- Bot lacks permission to post in a specific topic
Suggested: when delivery.to contains :topic:, append a hint such as:
"Bot may lack permission to post in this topic. Check if the topic restricts posting to admins only."
Root Cause
Telegram's Bot API returns the same 403: Forbidden: bot was kicked from the supergroup chat for both scenarios:
- Bot removed from the group
- Bot attempting to post in a topic where it lacks
can_post_messages permission (e.g. General topic with admin-only posting)
OpenClaw correctly treats this as a permanent error (no retry), but the error message leads users — and agents — to investigate the wrong direction (re-adding the bot, checking tokens, etc.).
Impact
PERMANENT_ANNOUNCE_DELIVERY_ERROR_PATTERNS and PERMANENT_ERROR_PATTERNS in delivery-queue.ts both match on /forbidden: bot was kicked/i, which is correct behaviour for retries — but the surfaced error message is misleading
- Users spend significant time re-adding the bot, checking tokens, and reviewing unrelated code paths
- Agents investigating the error also follow the wrong diagnosis path
Suggested Fix
When the resolved delivery target contains a threadId (i.e. a forum topic), supplement the 403 error message:
403: Forbidden: bot was kicked from the supergroup chat
Hint: target includes a forum topic (:topic:1). This error may indicate the topic restricts posting to admins only, not that the bot was removed from the group. Try changing the topic ID or granting the bot posting rights in that topic.
Alternatively, detect and distinguish the two cases if Telegram ever returns different error strings for them.
Workaround
Change delivery.to from topic:1 (General) to a non-restricted topic ID. General topic (topic:1) in Telegram Forum groups defaults to admin-only posting.
Environment
- OpenClaw 2026.2.23
- Telegram channel, forum group with Topics enabled
- Cron job with
sessionTarget: "isolated", wakeMode: "now", delivery.mode: "announce"
Summary
When a cron job is configured to deliver to a Telegram Forum topic that restricts posting (e.g.
topic:1/ General), the bot receives a403: Forbidden: bot was kicked from the supergroup chaterror. This message is identical to the error when the bot is actually removed from the group, making root cause analysis extremely difficult.Steps to Reproduce
delivery.to = "<chatId>:topic:1"(General topic)Actual Behaviour
The bot is still a member of the group and responds normally to direct messages. Only cron delivery fails.
Expected Behaviour
The error message should distinguish between:
Suggested: when
delivery.tocontains:topic:, append a hint such as:Root Cause
Telegram's Bot API returns the same
403: Forbidden: bot was kicked from the supergroup chatfor both scenarios:can_post_messagespermission (e.g. General topic with admin-only posting)OpenClaw correctly treats this as a permanent error (no retry), but the error message leads users — and agents — to investigate the wrong direction (re-adding the bot, checking tokens, etc.).
Impact
PERMANENT_ANNOUNCE_DELIVERY_ERROR_PATTERNSandPERMANENT_ERROR_PATTERNSindelivery-queue.tsboth match on/forbidden: bot was kicked/i, which is correct behaviour for retries — but the surfaced error message is misleadingSuggested Fix
When the resolved delivery target contains a
threadId(i.e. a forum topic), supplement the 403 error message:Alternatively, detect and distinguish the two cases if Telegram ever returns different error strings for them.
Workaround
Change
delivery.tofromtopic:1(General) to a non-restricted topic ID. General topic (topic:1) in Telegram Forum groups defaults to admin-only posting.Environment
sessionTarget: "isolated",wakeMode: "now",delivery.mode: "announce"