Telegram: assistant responses not persisted to session DB
Description
Gateway delivers assistant responses to Telegram successfully (confirmed in gateway.log), but does not persist them to the session database. This causes the model to see consecutive user messages as "unanswered" and respond to all of them in a single turn.
Environment
- Hermes Agent v0.16.0
- Platform: Telegram (polling mode)
- Model: DeepSeek v4 Pro
- OS: Linux 6.8.0-48-generic
Observed Behavior
- User sends message A → Gateway responds in Telegram ✅ (visible in gateway.log)
- User sends message B → Gateway responds in Telegram ✅
- User sends message C → Gateway responds in Telegram, but the response includes answers to A, B, and C
Root Cause
Checking session DB shows no assistant messages between user messages A, B, and C. The responses were delivered to Telegram but not written to the session. When the model processes message C, it sees three unanswered user messages and answers all three.
Gateway log: Session DB:
inbound "A" → response sent ✅ user: "A"
inbound "B" → response sent ✅ user: "B" ← no assistant responses!
inbound "C" → response sent ✅ user: "C" ← model answers A+B+C
Evidence
gateway.log timestamps (UTC, June 11 2026):
06:37:18 inbound: «Привет, Хёрми! Как дела?»
06:37:25 response ready (6.4s, 48 chars)
06:37:45 inbound: «Не курил второй кальян»
06:38:19 response ready (33.8s, 488 chars)
06:39:14 inbound: «Проснулся хорошо...» (voice)
06:39:24 response ready (9.6s, 256 chars)
Session DB (message IDs 8051–8055): only user messages, zero assistant messages between them.
Related
Steps to Reproduce
- Send 2-3 messages to the bot in Telegram, waiting for each response
- Inspect session DB — check if assistant responses appear between user messages
- Observe: when the 3rd message is processed, model answers all three
Telegram: assistant responses not persisted to session DB
Description
Gateway delivers assistant responses to Telegram successfully (confirmed in gateway.log), but does not persist them to the session database. This causes the model to see consecutive user messages as "unanswered" and respond to all of them in a single turn.
Environment
Observed Behavior
Root Cause
Checking session DB shows no assistant messages between user messages A, B, and C. The responses were delivered to Telegram but not written to the session. When the model processes message C, it sees three unanswered user messages and answers all three.
Evidence
gateway.logtimestamps (UTC, June 11 2026):Session DB (message IDs 8051–8055): only user messages, zero assistant messages between them.
Related
Steps to Reproduce