From b90e80ed6c5b352b7f9e41b72aef0b6f26ff9811 Mon Sep 17 00:00:00 2001 From: m3taversal Date: Mon, 23 Mar 2026 12:31:01 +0000 Subject: [PATCH] epimetheus: don't track silent group messages in history (Ganymede review) Option A: history only contains actual bot-user exchanges, not unaddressed group messages. Empty bot responses in history confused the model. Pentagon-Agent: Epimetheus <3D35839A-7722-4740-B93D-51157F7D5E70> --- telegram/bot.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/telegram/bot.py b/telegram/bot.py index 7299baf..b490b57 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -447,12 +447,8 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE): user.username or "?", unanswered_count[key], CONVERSATION_WINDOW) await handle_tagged(update, context) return - else: - # Group: silent context tracking only - history = conversation_history.setdefault(key, []) - history.append({"user": text[:500], "bot": ""}) - if len(history) > MAX_HISTORY: - history.pop(0) + # Group: don't track silent messages in history (Ganymede: Option A) + # History should be the actual conversation, not a log of everything said in the group # Expire window after CONVERSATION_WINDOW unanswered messages if unanswered_count[key] >= CONVERSATION_WINDOW: del unanswered_count[key]