From 4e860cc67d4256d2ab8638a02241ae7e25c58f54 Mon Sep 17 00:00:00 2001 From: Glucksberg Date: Mon, 26 Jan 2026 04:54:09 +0000 Subject: [PATCH] fix(telegram): thread accountId through native command context Native Telegram commands (slash menu) did not include AccountId in the message context, causing /reset confirmations to be delivered through the default Telegram bot instead of the account-specific bot. The session routing worked correctly (correct agent session was reset) but the confirmation message delivery used the wrong account because params.ctx.AccountId was undefined in handleCommands. Fixes #2038 --- src/telegram/bot-native-commands.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/telegram/bot-native-commands.ts b/src/telegram/bot-native-commands.ts index cd53459e6..4b5266512 100644 --- a/src/telegram/bot-native-commands.ts +++ b/src/telegram/bot-native-commands.ts @@ -485,6 +485,8 @@ export const registerTelegramNativeCommands = ({ // Originating context for sub-agent announce routing OriginatingChannel: "telegram" as const, OriginatingTo: `telegram:${chatId}`, + // Multi-account: preserve accountId for command confirmations (e.g., /reset) + AccountId: route.accountId, }); const disableBlockStreaming =