Skip to content

visual: raise the media say / replay timeout so long turns aren't cut off#145

Merged
davidj4tech merged 1 commit into
mainfrom
canvas-say-timeout
Jul 11, 2026
Merged

visual: raise the media say / replay timeout so long turns aren't cut off#145
davidj4tech merged 1 commit into
mainfrom
canvas-say-timeout

Conversation

@davidj4tech

Copy link
Copy Markdown
Owner

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 legitimately runs for minutes. The old timeout=20 (_say) and timeout=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:

_SAY_TIMEOUT_S = int(os.environ.get("MEDIA_VISUAL_SAY_TIMEOUT") or 900)  # 15 min

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 — ThreadingHTTPServer uses 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_compile passes; _SAY_TIMEOUT_S resolves to 900.
  • agent-media-visual-canvas.service restarted — active.

🤖 Generated with Claude Code

… 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.
@davidj4tech davidj4tech merged commit 1b07a94 into main Jul 11, 2026
2 checks passed
@davidj4tech davidj4tech deleted the canvas-say-timeout branch July 11, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant