Bug
When using Telegram DM topics with 1M context window (Opus), OpenClaw creates two session entries for the same thread:
- Real session (full Telegram-specific key):
agent:main:telegram:personal:direct:<userId>:thread:<userId>:<topicId> - contains all usage data (totalTokens, inputTokens, outputTokens, cacheRead, cacheWrite)
- Phantom session (short main-alias key):
agent:main:main:thread:<userId>:<topicId> - all fields are null
When /status is invoked, it resolves to the phantom session (shorter "main" alias key), showing Context: 0/1.0m (0%) even though the real session has ~60k tokens of actual usage.
Evidence
# Real session (has data):
agent:main:telegram:personal:direct:XXXXX:thread:XXXXX:1039883
totalTokens: 60796
cacheRead: 59035
cacheWrite: 1760
model: claude-opus-4-6
contextTokens: 1000000
# Phantom session (empty):
agent:main:main:thread:XXXXX:1039883
totalTokens: null
totalTokensFresh: null
inputTokens: null
contextTokens: null
Expected Behavior
- Either only one session entry should exist per thread
- Or
/status should resolve to the session that has actual usage data
Environment
- OpenClaw 2026.3.14 (0d9d1ce)
- Model: anthropic/claude-opus-4-6 (1M context)
- Channel: Telegram DM with topics enabled
- Context window: 1,000,000 tokens configured
Related Issues
Bug
When using Telegram DM topics with 1M context window (Opus), OpenClaw creates two session entries for the same thread:
agent:main:telegram:personal:direct:<userId>:thread:<userId>:<topicId>- contains all usage data (totalTokens, inputTokens, outputTokens, cacheRead, cacheWrite)agent:main:main:thread:<userId>:<topicId>- all fields arenullWhen
/statusis invoked, it resolves to the phantom session (shorter "main" alias key), showingContext: 0/1.0m (0%)even though the real session has ~60k tokens of actual usage.Evidence
Expected Behavior
/statusshould resolve to the session that has actual usage dataEnvironment
Related Issues