Problem
Live Zeus Telegram direct sessions can preserve prior inbound user messages in the JSONL transcript while omitting those user turns from the model request context. This makes replies behave as if the bot has no memory of the previous Telegram messages.
Observed live example: session agent:main:telegram:direct:8599953238 kept the user turn UniFi code 498563 in the transcript file, but later context.compiled / prompt.submitted trajectory events did not include that string.
Fix direction
- Treat SessionManager transcript context as authoritative when restored active session state is missing persisted user turns.
- Support account-scoped direct-message session keys when resolving per-DM history limits.
- Keep stale final-answer replay and no-reply fallback regressions covered on the same deployment branch so Zeus does not regress overnight.
Acceptance
- Regression test proves a Telegram prior user turn present in SessionManager but absent in active restored state is included before context-engine assembly and prompt submission.
- History-limit tests cover
agent:<agent>:telegram:<account>:direct:<user>.
- OpenClaw build and focused Telegram/session tests pass.
Problem
Live Zeus Telegram direct sessions can preserve prior inbound user messages in the JSONL transcript while omitting those user turns from the model request context. This makes replies behave as if the bot has no memory of the previous Telegram messages.
Observed live example: session
agent:main:telegram:direct:8599953238kept the user turnUniFi code 498563in the transcript file, but latercontext.compiled/prompt.submittedtrajectory events did not include that string.Fix direction
Acceptance
agent:<agent>:telegram:<account>:direct:<user>.