fix: clear silence timer during active processing to prevent false 'Are you still there?'#8436
Merged
Merged
Conversation
…re you still there?' Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a349a8ef93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Contributor
Author
|
Addressed in #8639 |
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
runTurnInner()so it doesn't fire while the assistant is actively processing (LLM inference, tool calls)idlestate (normal completion, abort, error)waiting_on_userstate (consultation timer handles that) and afterEND_CALL(call is ending)Original prompt
Bug #3: Silence timeout fires while assistant is actively processing tool calls
Problem: During inbound voice calls, the 30-second silence timer (
SILENCE_TIMEOUT_MSincall-constants.ts) fires and sends "Are you still there?" to the caller even when the assistant is actively processing their request (e.g. running LLM inference, executing tool calls likehost_bash). The timer only resets on new caller utterances, not on assistant-side activity.Evidence from logs: In call session
ec8230b7, the caller said "Can you tell me how many files I have on my desktop?" at timestamp:65.824. The assistant began processing this request, which involved calling the LLM and then executinghost_bashwithls ~/Desktop | wc -l. Thehost_bashtool permission request didn't fire until:25.871(60 seconds later), and the tool execution + second LLM turn didn't complete until:28.117. Meanwhile, at:95.831(exactly 30 seconds after the last caller utterance), the silence timer fired and sent "Are you still there?" even though the assistant was actively working on the caller's request.Root cause: In
assistant/src/calls/call-controller.ts,resetSilenceTimer()is called inhandleCallerUtterance()andstartInitialGreeting(), but NOT when the controller entersprocessingorspeakingstate. The silence timer continues counting down during LLM inference and tool execution. If the total processing time exceeds 30 seconds, the timer fires.File to modify:
assistant/src/calls/call-controller.tsFix: Clear the silence timer when entering
runTurnInner()(i.e. when the assistant starts actively processing), and only restart it when the controller returns toidlestate.🤖 Generated with Claude Code