fix(telegram): stop typing indicator when LLM fails or hangs#1390
Merged
afjcjsbx merged 4 commits intosipeed:mainfrom Mar 19, 2026
Merged
fix(telegram): stop typing indicator when LLM fails or hangs#1390afjcjsbx merged 4 commits intosipeed:mainfrom
afjcjsbx merged 4 commits intosipeed:mainfrom
Conversation
010e2e5 to
dc037f0
Compare
xuwei-xy
pushed a commit
to xuwei-xy/picoclaw
that referenced
this pull request
Mar 14, 2026
Contributor
Author
|
Hi, maintainers. Thanks |
Made-with: Cursor
Made-with: Cursor
Contributor
Author
|
I fixed lint error. There was some mistakes during the commit. Thanks |
afjcjsbx
approved these changes
Mar 19, 2026
This was referenced Mar 20, 2026
j0904
pushed a commit
to j0904/picoclaw
that referenced
this pull request
Mar 22, 2026
…ss-typing fix(telegram): stop typing indicator when LLM fails or hangs
|
@kiannidev Good fix for the typing indicator leak! Having it spin forever when the LLM fails was definitely confusing for users. Clean root cause analysis too. We are building a PicoClaw Dev Group on Discord for contributors. If you would like to join, send an email to |
andressg79
pushed a commit
to andressg79/picoclaw
that referenced
this pull request
Mar 30, 2026
…ss-typing fix(telegram): stop typing indicator when LLM fails or hangs
ra1phdd
pushed a commit
to ra1phdd/picoclaw-pkg
that referenced
this pull request
Apr 12, 2026
…ss-typing fix(telegram): stop typing indicator when LLM fails or hangs
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.
Summary
Fixes #1323 — typing indicator kept running when the LLM failed, timed out, or hung.
Root cause
The
cancelfunction was only invoked inpreSendwhen an outbound message was sent. If the LLM failed or hung, no response was published, socancelwas never called and the typing goroutine ran indefinitely.Changes
defer InvokeTypingStop(msg.Channel, msg.ChatID)so typing stops when processing completes (success, error, or panic), regardless of publish.InvokeTypingStop(channel, chatID)to invoke the registered typing stop function.context.WithTimeoutas fallback so the goroutine exits even ifcancelis never called (e.g. LLM hangs).Testing
go test ./pkg/channels/... ./pkg/agent/...InvokeTypingStop