From a6a550032a6dd832315b491ab5263d7a266f9884 Mon Sep 17 00:00:00 2001 From: Sash Catanzarite Date: Wed, 7 Jan 2026 08:16:00 -0800 Subject: [PATCH] fix(typing): refresh TTL on every startTypingLoop call Previously, startTypingLoop would return early if the typing timer was already running, which meant the TTL would never get refreshed during long tool executions. This caused the typing indicator to stop after 2 minutes even if tools were still running. Now we refresh the TTL at the start of startTypingLoop, before the early-return checks. This keeps typing alive during long operations. --- src/auto-reply/reply/typing.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/auto-reply/reply/typing.ts b/src/auto-reply/reply/typing.ts index 09cc4e51b..7aba34c85 100644 --- a/src/auto-reply/reply/typing.ts +++ b/src/auto-reply/reply/typing.ts @@ -102,11 +102,13 @@ export function createTypingController(params: { const startTypingLoop = async () => { if (sealed) return; if (runComplete) return; + // Always refresh TTL when called, even if loop already running. + // This keeps typing alive during long tool executions. + refreshTypingTtl(); if (!onReplyStart) return; if (typingIntervalMs <= 0) return; if (typingTimer) return; await ensureStart(); - refreshTypingTtl(); typingTimer = setInterval(() => { void triggerTyping(); }, typingIntervalMs);