P2

Appointment booked for the wrong day

SEN-4471 · healthcare-voice-bot · 2026-08-11 09:14:52 UTC

Trace69e7e2c95e3109c6
Tokens22.2K → 4.1KCost$0.0852
Post-mortemReplay with the fix
34 spansDurationTokensCost

Causal Copilot

I analyzed trace 69e7e2c95e3109c6: healthcare-voice-bot, 34 spans over 1m 40s, 26.3K tokens (~$0.0852).

Trace structure
  • 5 LLM calls, 7 tool calls, 3 failing spans
  • Entry point: voice-scheduler.run
  • First failure: tool.book_appointment at agents/voice/booking.py:71
Why the intent drift detector fired

The patient requested Tuesday; the agent booked Thursday. ASR confidence on the date was 0.61 against a 0.75 threshold, and confirm_gate skipped the read-back to stay inside the latency SLA, so the low-confidence date was never verified.

Confidence 88% (judge: claude-haiku-5-5).

Root cause: 2 hops upstream

7c1d9e2a added a fast path to confirm_gate that checks the latency budget before it reads the policy verdict (agents/voice/booking.py:49). This turn was inside the 500ms budget at 412ms, so the gate returned COMMIT_NOW and discarded both SPEAK_AND_WAIT and requires_verbal_confirmation. The date had scored 0.61 against the 0.75 threshold, so the wrong day was committed without the patient hearing it read back.

Introduced in commit 7c1d9e2a (agents/voice/booking.py:49).

Counterfactual: If confirm_gate had read the verdict and requires_verbal_confirmation before the latency check, the 0.61 date would have been read back, and the caller could have corrected Thursday to Tuesday before anything was booked.

The fix

confirm_gate checked the latency budget before the policy verdict, so a turn inside 500ms committed even when booking-policy §4.2 required a read-back. Decide the read-back first: any date or time field below the 0.75 confidence threshold is always spoken back and acknowledged. The fast path keeps trimming optional speech only.

→ PR #1188 (causal/fix-SEN-4471), +2/−3, verified, awaiting merge.

TL;DR: Confirmation skipped under latency SLA let a low-confidence ASR date commit. Fixing agents/voice/booking.py removes this failure class entirely.

Demo: scripted from this incident's datalive: claude-sonnet-5-5