-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Description
Bug
The Telegram "typing..." indicator gets stuck and persists indefinitely. Runs log embedded run start but never log a corresponding run end, so the typing loop is never cleaned up.
Environment
- OpenClaw: 2026.2.24 (df9a474)
- OS: macOS (Apple Silicon), Node v25.5.0
- Channel: Telegram (direct + group chats affected)
Reproduction
- Send any message to the bot on Telegram
- Run starts → typing indicator begins (expected)
- Run completes, reply is sent successfully
- Typing indicator continues indefinitely
openclaw gateway restartclears it temporarily- Returns on next message
Evidence
Run starts logged, zero run ends in entire log file
$ grep "embedded run start" openclaw-2026-02-26.log | wc -l
10
$ grep "run end\|run complete" openclaw-2026-02-26.log | wc -l
0
Every run successfully produces a response (tool calls, messages sent, etc.) but the run completion event is never emitted, so the typing cleanup never fires.
TTL fires but is insufficient
typing TTL reached (2m); stopping typing indicator
The 2-minute TTL does eventually kill individual loops, but by then new messages have triggered new runs with new leaked typing loops.
Sample run start (no matching end)
embedded run start: runId=7e998b87-0c7a-458c-a72f-f577494fd56f
sessionId=79e1266b provider=anthropic model=claude-opus-4-6
thinking=low messageChannel=telegram
Root Cause
The typing loop is started on run start but the run lifecycle never emits a completion/end event, so:
- The
clearIntervalfor the 5-secondsendChatAction("typing")ping is never called - Each new message creates another leaked interval
- Gateway restart is the only reliable cleanup
Expected Behavior
- Typing indicator should stop when the run completes (reply sent or NO_REPLY/HEARTBEAT_OK)
embedded run endshould be logged for everyembedded run start
Suggested Fixes
- Ensure run end event is always emitted — the run promise resolve/reject should trigger typing cleanup
- Tie typing interval to run lifecycle — clear the interval in a
finallyblock - Shorter TTL — 30-60s instead of 2min as a safety net
- Log run end events — currently invisible, making debugging difficult
Workaround
openclaw gateway restart clears all stuck typing loops temporarily.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels