-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Bug Description
PR #26881 correctly identified that the followup runner was missing typing.markDispatchIdle() in its finally block, causing the typing indicator to persist indefinitely on Telegram.
However, the main reply pipeline has the exact same issue. After backporting #26881 to our 2026.2.24 install, the typing indicator was still getting stuck on normal inbound replies (not just followup turns).
Root Cause
The main reply function's finally block (in the compiled source, near finalizeWithFollowup) only calls:
} finally {
blockReplyPipeline?.stop();
typing.markRunComplete();
// markDispatchIdle() is missing here too
}The expectation is that markDispatchIdle() gets called by the buffered dispatcher's finally block. But if the dispatcher exits early, errors, or the reply path doesn't go through the dispatcher cleanly, the second signal never fires and the typing keepalive loop runs indefinitely — same as the followup runner bug.
Fix
Same one-liner as #26881 — add typing.markDispatchIdle() after typing.markRunComplete() in the main reply pipeline's finally block:
} finally {
blockReplyPipeline?.stop();
typing.markRunComplete();
typing.markDispatchIdle(); // needed as safety net
}This exists in the same set of dist files:
reply-*.jssubagent-registry-*.jsplugin-sdk/reply-*.js
Why This Matters
Adding markDispatchIdle() as a safety net in both finally blocks is harmless — maybeStopOnIdle() only runs cleanup when BOTH runComplete and dispatchIdle are true, so calling it twice is a no-op. But without it, any case where the dispatcher's finally doesn't fire leaves typing stuck.
Version
2026.2.24
Related
- fix(typing): call markDispatchIdle in followup runner to prevent stuck indicator #26881 (followup runner fix — same pattern)
- bug(telegram): typing indicator stuck after 2026.2.24 update (regression from #26295/#26325) #26993 (original typing indicator report)
- Regression: Typing indicator persists indefinitely after response completes (2026.2.24) #27053 (regression report)