fix: keep typing indicator alive during long inference#25886
Closed
stakeswky wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix: keep typing indicator alive during long inference#25886stakeswky wants to merge 1 commit intoopenclaw:mainfrom
stakeswky wants to merge 1 commit intoopenclaw:mainfrom
Conversation
steipete
added a commit
that referenced
this pull request
Feb 25, 2026
…stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
Contributor
|
Implemented and landed on What I changed (reimplemented after code review):
Validation:
Thanks for the report and PR, @stakeswky. |
joshavant
pushed a commit
that referenced
this pull request
Feb 25, 2026
…stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
margulans
pushed a commit
to margulans/Neiron-AI-assistant
that referenced
this pull request
Feb 25, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
Jackson3195
pushed a commit
to Jackson3195/openclaw-with-a-personal-touch
that referenced
this pull request
Feb 25, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
brianleach
pushed a commit
to brianleach/openclaw
that referenced
this pull request
Feb 26, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
2 tasks
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Feb 27, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
6 tasks
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 1, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com> (cherry picked from commit e0201c2) # Conflicts: # src/channels/channel-helpers.test.ts # src/discord/monitor/message-handler.process.ts # src/telegram/bot-message-dispatch.ts
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 3, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com> (cherry picked from commit e0201c2) # Conflicts: # src/channels/channel-helpers.test.ts # src/discord/monitor/message-handler.process.ts # src/telegram/bot-message-dispatch.ts
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
thebenjaminlee
pushed a commit
to escape-velocity-ventures/openclaw
that referenced
this pull request
Mar 7, 2026
… thanks @stakeswky) Co-authored-by: stakeswky <stakeswky@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #25882
Problem
Typing indicators can expire during long LLM inference. Some channels (for example Matrix) rely on a server-side typing TTL, so a single typing event at reply start disappears before the model finishes.
Root Cause
createTypingCallbacksonly sent typing on reply start and did not refresh it while inference was still running. Once the platform TTL elapsed, the indicator dropped even though processing continued.Fix
createTypingCallbacks(default 3s) that re-sends typing until cleanuponIdle/onCleanupcleanup to stop the keepalive timer and optionally sendstopstart()callsTesting
pnpm exec vitest run --config vitest.unit.config.ts src/channels/channel-helpers.test.ts --maxWorkers=1✅pnpm test:fast -- src/channels/channel-helpers.test.tswas also attempted, but this script runs the full unit suite in this repo and hit unrelated existing failures (e.g.src/telegram/bot.media.downloads-media-file-path-no-file-download.test.ts,src/plugins/discovery.test.ts)Greptile Summary
Adds a keepalive mechanism to typing indicators so they remain visible during long LLM inference operations. Previously, typing indicators expired when platform TTLs elapsed, especially on channels like Matrix. The fix introduces a 3-second refresh loop that re-sends typing events until cleanup, along with deduplication logic to prevent multiple stop calls.
Confidence Score: 5/5
keepaliveStartInFlightflag, properly clears timers on cleanup, and deduplicates stop calls with thestopSentflag. Test coverage is comprehensive, including fake timer tests for the keepalive mechanism and deduplication edge cases.Last reviewed commit: 03db125