{"record":{"id":"e8e82f4d4a5d10ba","repo":"NousResearch/hermes-agent","slug":"telegram-private-dm-topic-delivery-requires-telegr","errorCode":null,"errorMessage":"Telegram private DM topic delivery requires telegram_reply_to_message_id; send to the bare chat or provide a reply anchor","messagePattern":"Telegram private DM topic delivery requires telegram_reply_to_message_id; send to the bare chat or provide a reply anchor","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"gateway/delivery.py","lineNumber":598,"sourceCode":"                        f\"Failed to create Telegram private DM topic '{target_thread_id}'\"\n                    )\n                target_thread_id = str(created_thread_id)\n                send_metadata[\"thread_id\"] = target_thread_id\n                send_metadata[\"telegram_dm_topic_created_for_send\"] = True\n            elif (\n                target.platform == Platform.TELEGRAM\n                and looks_like_telegram_private_chat_id(target.chat_id)\n                and \"thread_id\" not in send_metadata\n                and \"message_thread_id\" not in send_metadata\n                and not has_explicit_direct_topic\n            ):\n                # Legacy private topic/thread ids that were not created by this\n                # send path may still need a reply anchor to stay visible in the\n                # requested lane. Named targets are created above via\n                # createForumTopic and can use message_thread_id directly.\n                reply_anchor = send_metadata.get(\"telegram_reply_to_message_id\")\n                if reply_anchor is None:\n                    raise RuntimeError(\n                        \"Telegram private DM topic delivery requires telegram_reply_to_message_id; \"\n                        \"send to the bare chat or provide a reply anchor\"\n                    )\n                send_metadata[\"thread_id\"] = target_thread_id\n                send_metadata[\"telegram_dm_topic_reply_fallback\"] = True\n            elif \"thread_id\" not in send_metadata and \"message_thread_id\" not in send_metadata and not has_explicit_direct_topic:\n                send_metadata[\"thread_id\"] = target_thread_id\n        result = await transport.send(\n            target.platform,\n            target.chat_id,\n            content,\n            metadata=send_metadata or None,\n        )\n        if _send_result_failed(result):\n            if (\n                is_named_telegram_private_topic\n                and named_telegram_private_topic_name\n                and _is_thread_not_found_delivery_error(result)","sourceCodeStart":580,"sourceCodeEnd":616,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/gateway/delivery.py#L580-L616","documentation":"Error \"Telegram private DM topic delivery requires telegram_reply_to_message_id; send to the bare chat or provide a reply anchor\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at gateway/delivery.py:598 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send to the bare chat, or include telegram_reply_to_message_id as a reply anchor for the topic delivery."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}