fix(agent): transcribe queued voice follow-ups#2828
Merged
Conversation
1b21d15 to
8362203
Compare
This was referenced May 9, 2026
afjcjsbx
approved these changes
May 9, 2026
Collaborator
afjcjsbx
left a comment
There was a problem hiding this comment.
this is an annoying picoclaw bug! thanks for the PR, LGTM!
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
Problem
When a user sent a second Telegram voice note while the first turn was still running, the follow-up did not go through the normal inbound
processMessage()path.The active-turn branch in
AgentLoop.Run()converted the inbound message directly into a steeringproviders.Messageand enqueued it. That bypassedtranscribeAudioInMessage(), so queued voice follow-ups could reach the model as raw[voice]media annotations instead of[voice: ...]text.In practice this made follow-up additions easy to lose. A common example was:
The second voice note could be ignored because it was never transcribed before steering injection.
Fix
Before enqueueing a follow-up into the steering queue, run the same audio transcription step used for normal inbound messages:
[voice]with[voice: ...]This keeps queued voice notes behaviorally consistent with ordinary turn starts.
Validation
go test ./pkg/agent -run 'TestAgentLoop_Run_(AutoContinuesLateSteeringMessage|QueuedVoiceMessageIsTranscribedBeforeSteering)' -count=1go test ./pkg/agent -run 'TestProcessMessage_MessageTool|TestNewAgentLoop' -count=1