fix(typing): add markDispatchIdle safety net to main reply pipeline#27250
Closed
Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(typing): add markDispatchIdle safety net to main reply pipeline#27250Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Conversation
The typing controller requires both markRunComplete() and markDispatchIdle() to stop the keepalive loop. The followup runner was fixed in openclaw#26881 to call both signals, but the main reply pipeline in agent-runner.ts only calls markRunComplete() in its finally block, relying on the dispatcher's onIdle callback for the second signal. If the dispatcher exits early, errors, or the reply path doesn't go through it cleanly, markDispatchIdle() is never called and the Telegram typing indicator persists indefinitely. Add the same safety-net pattern from openclaw#26881: call typing.markDispatchIdle() in the finally block. This is harmless when the dispatcher fires normally — cleanup() is guarded by the active flag — but prevents stuck indicators on every edge case. Closes openclaw#27172 Closes openclaw#27174 Closes openclaw#27177 Closes openclaw#27219 Closes openclaw#27226
Contributor
Greptile SummaryAdds defensive safety net to prevent stuck Telegram typing indicators by ensuring both cleanup signals (
Confidence Score: 5/5
Last reviewed commit: 7b2239e |
steipete
added a commit
that referenced
this pull request
Feb 26, 2026
@Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
Contributor
|
Landed on What was landed from this PR:
Attribution:
Validation run before landing (
Thanks @Sid-Qin for the fix. |
This was referenced Feb 26, 2026
Closed
Closed
Closed
robbyczgw-cla
pushed a commit
to robbyczgw-cla/openclaw
that referenced
this pull request
Feb 26, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Feb 27, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
r4jiv007
pushed a commit
to r4jiv007/openclaw
that referenced
this pull request
Feb 28, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
vincentkoc
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Feb 28, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
vincentkoc
pushed a commit
to rylena/rylen-openclaw
that referenced
this pull request
Feb 28, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
steipete
added a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
vincentkoc
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Feb 28, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
vincentkoc
pushed a commit
to rylena/rylen-openclaw
that referenced
this pull request
Feb 28, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
steipete
added a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.com>
thebenjaminlee
pushed a commit
to escape-velocity-ventures/openclaw
that referenced
this pull request
Mar 7, 2026
…, thanks @Sid-Qin) Co-authored-by: Sid Qin <s3734389@gmail.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.
Summary
markDispatchIdle()never fires.openclaw gateway restart, which is disruptive and temporary.markRunComplete()ANDmarkDispatchIdle(). The followup runner was fixed in fix(typing): call markDispatchIdle in followup runner to prevent stuck indicator #26881 to call both in itsfinallyblock, but the main reply pipeline (agent-runner.ts) only callsmarkRunComplete(), relying on the dispatcher'sonIdlecallback for the second signal. If the dispatcher exits early, errors, or the reply path doesn't go through it cleanly,markDispatchIdle()is never called.src/auto-reply/reply/agent-runner.ts— Addedtyping.markDispatchIdle()as a safety net in thefinallyblock, identical to the fix(typing): call markDispatchIdle in followup runner to prevent stuck indicator #26881 followup runner fix.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
NoNoNoNoNoRepro + Verification
Environment
Steps
Expected
Actual
Evidence
The fix is the same one-liner pattern proven in #26881 for the followup runner. Calling
markDispatchIdle()twice is harmless —cleanup()is guarded by theactiveflag, andmaybeStopOnIdle()only fires cleanup when bothrunCompleteanddispatchIdleare true.Human Verification (required)
Compatibility / Migration
YesNoNoFailure Recovery (if this breaks)
src/auto-reply/reply/agent-runner.tsRisks and Mitigations
None — this is a defensive safety net. The same pattern is already proven in production via #26881 for the followup runner. The typing controller's
cleanup()is idempotent.