Skip to content

fix(pause/resume): use freshest transcript (voice or phone), not stale symlink#523

Merged
sonichi merged 1 commit intomainfrom
fix/pause-resume-voice-transcript
Apr 26, 2026
Merged

fix(pause/resume): use freshest transcript (voice or phone), not stale symlink#523
sonichi merged 1 commit intomainfrom
fix/pause-resume-voice-transcript

Conversation

@sonichi
Copy link
Copy Markdown
Owner

@sonichi sonichi commented Apr 26, 2026

Summary

  • pause_video / resume_video guards read /tmp/sutando-live-transcript.txt, a symlink that phone-conversation writes on call start and never clears on call end.
  • In voice-agent sessions the symlink points to the last phone call's transcript (often hours old), guard filters for Caller: lines from a stale phone session, blocks every pause.

Symptom from voice-agent.log:

[PauseVideo] BLOCKED — no pause keyword in recent caller speech:
"[07:40:37] caller: dismiss [07:40:44] caller: hi. [07:40:48] caller: bye."

That phone session ended ~14h before the talk-day pause attempt.

Fix

  • Add getRecentUserSpeech() helper: pick the freshest of -voice.txt (voice-agent) vs the symlink target (phone), match both Caller: and User: line prefixes, return '' if neither is fresh (<60s).
  • Use it in both pause and resume guards. Empty result = fail open.
  • Susan's hallucination guard (2026-04-16) stays intact when the picked transcript is fresh.

Test plan

  • TS clean
  • Voice "pause" mid-demo → pauses
  • Voice "resume" → resumes
  • Same flow on phone-conversation context still blocks hallucinated pause/resume

🤖 Generated with Claude Code

…e symlink

The pause_video and resume_video guards read /tmp/sutando-live-transcript.txt,
which is a symlink the phone-conversation server writes when a call starts —
and never clears when the call ends. In voice-agent context the symlink
points to the last phone call's transcript, often hours old, so the guard
filters for "Caller:" lines from a stale phone session and blocks every
pause/resume because it can't find a fresh keyword.

Symptom: voice "pause" → "[PauseVideo] BLOCKED — no pause keyword in recent
caller speech: '[07:40:37] caller: dismiss [07:40:44] caller: hi.
[07:40:48] caller: bye.'" — phone transcript hours stale during voice
session 14h later.

Fix: pick the freshest of /tmp/sutando-live-transcript-voice.txt
(voice-agent writes here) vs the symlink target (phone). If neither is
fresh (<60s), fail open — better to honor an explicit pause than block
silently. Match Caller: OR User: line prefixes.

Susan's hallucination guard (2026-04-16) is preserved when the picked
transcript is fresh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonichi sonichi merged commit a687534 into main Apr 26, 2026
1 check passed
@sonichi sonichi deleted the fix/pause-resume-voice-transcript branch April 26, 2026 02:21
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