Skip to content

Private-chat topics: createForumTopic succeeds, but the new topic answers "message thread not found" to every bot write and TOPIC_ID_INVALID to deleteForumTopic #905

Description

@K-Serik

Environment

  • Cloud Bot API (api.telegram.org), Bot API 10.3, grammY on Node.
  • The bot has Threaded Mode enabled in the @Botfather Mini App, with "Disallow users to create new threads" on.
  • The bot creates topics in its private chat with one user (a support desk: one topic per customer). Several hundred topics so far, topic ids around 47,000. Most topics work normally.

What happens (sporadic: 3 occurrences between 2026-09-25 and 2026-09-28)

  1. createForumTopic(chat_id=<user>, name, icon_custom_emoji_id) → ok, returns message_thread_id (e.g. 47280).
  2. The first write, sendMessage(chat_id=<user>, text, message_thread_id=47280), milliseconds later → 400 Bad Request: message thread not found.
  3. deleteForumTopic(chat_id=<user>, 47280) → 400 Bad Request: TOPIC_ID_INVALID.
  4. The topic is visible in the user's app (iOS): it is listed with "No messages here yet", and its "… was created" service message appears in the general area, not inside the topic.
  5. Messages the user types in that topic reach the bot as normal topic messages carrying message_thread_id = 47280. Every bot write into it keeps failing with message thread not found: seen 1h 19 min after creation, and 5+ hours after creation in another case.

Timeline

  • 2026-09-25: one topic dead from creation (first write 13 ms after createForumTopic), still dead 5+ hours later. Other topics created that day worked.
  • 2026-09-26: a topic that had worked for 31 hours started answering message thread not found. Two replacement topics created right away (130 ms apart) were both dead from creation. A topic created ~10 minutes later worked, while the old one was still "not found".
  • 2026-09-28 18:46 UTC: two topics created back to back (ids 47280 and 47281), both dead from creation; deleteForumTopic → TOPIC_ID_INVALID for both. A topic created earlier that day (47166) works normally.

Expected
A topic returned by createForumTopic accepts sendMessage with its message_thread_id or createForumTopic fails.

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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