visual: raise the media say / replay timeout so long turns aren't cut off#145
Merged
Conversation
… off media say (and replay-at-cursor) block until the utterance finishes PLAYING, not just rendering, so a per-turn play of a long assistant turn runs for minutes. The 20s/10s subprocess timeouts were killing media say mid-sentence and cutting the audio off. Make the timeout a hung-process backstop, not a length cap: one env-overridable constant (MEDIA_VISUAL_SAY_TIMEOUT, default 900s) for both paths.
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.
media sayandreplay-at-cursorblock until the utterance finishes playing (not just rendering), so a per-turn play of a long assistant turn legitimately runs for minutes. The oldtimeout=20(_say) andtimeout=10(_play_pane) were killing the subprocess mid-sentence, cutting the audio off partway through long turns.Fix: treat the subprocess timeout as a hung-process backstop, not a length cap. One env-overridable constant covers both paths:
Applied to both
_say(per-turn play from the peek panel) and_play_pane(a pane's last clip). Blocking an HTTP worker thread for the playback duration is fine here —ThreadingHTTPServeruses a daemon thread per request, and the client already relies on the SSE speaking-state (not the response) to clear its play-load spinner.Validation
py_compilepasses;_SAY_TIMEOUT_Sresolves to 900.agent-media-visual-canvas.servicerestarted — active.🤖 Generated with Claude Code