Skip to content

[Bug]: voice-call stale reaper ends active Twilio conversation after ~120s #79121

Description

@donkeykong91

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Twilio inbound voice-call conversation mode was actively transcribing and responding, but the voice-call stale-call reaper ended the live call after ~123 seconds while the call state was speaking.

Steps to reproduce

  1. Run OpenClaw 2026.5.7 with @openclaw/voice-call 2026.5.7 configured for Twilio inbound calls, streaming transcription enabled, and conversation mode.
  2. Call the configured Twilio number from an allowed caller.
  3. Continue a multi-turn conversation for more than ~120 seconds.
  4. Observe the Gateway log line Reaping stale call ... (age: 123s, state: speaking) followed by Twilio media stream stop/disconnect and the call ending as hangup-bot.

Expected behavior

A live Twilio streaming conversation that is actively receiving transcripts and generating AI responses should not be reaped as stale. Stale cleanup should only end calls that are actually stuck/non-active, or it should use a timeout higher than the configured max conversation duration.

Actual behavior

The live call was ended by OpenClaw's stale-call reaper after ~123 seconds even though transcripts and AI responses were still flowing. The call record transitioned from state: speaking to state: hangup-bot with endReason: hangup-bot.

OpenClaw version

2026.5.7 (observed via openclaw status)

Operating system

Linux 6.8.0-111-generic (x64)

Install method

npm global / OpenClaw Gateway running as systemd user service

Model

openai-codex/gpt-5.5 for the agent session; voice-call streaming transcription provider configured as OpenAI (gpt-4o-transcribe), TTS provider OpenAI (gpt-4o-mini-tts).

Provider / routing chain

Twilio Programmable Voice -> Tailscale Funnel -> OpenClaw voice-call webhook on local Gateway -> OpenAI transcription/TTS -> OpenClaw agent session

Additional provider/model setup details

  • Voice-call plugin: @openclaw/voice-call 2026.5.7
  • Provider: Twilio
  • Direction: inbound
  • Mode observed in logs: conversation
  • Streaming transcription: enabled
  • Realtime voice: disabled
  • Public exposure: Tailscale Funnel proxying to local voice webhook
  • Sensitive values, phone numbers, hostnames, and user utterance details below are redacted.

Logs, screenshots, and evidence

# Redacted Gateway logs from one observed call
May 07 15:41:57 node[10871]: [voice-call] Created inbound call record: <call-id> from <allowed-caller>
May 07 15:41:57 node[10871]: [MediaStream] Stream started: <stream-sid> (call: <twilio-call-sid>)
May 07 15:41:58 node[10871]: [voice-call] Speaking initial message for call <call-id> (mode: conversation)
May 07 15:42:05 node[10871]: [voice-call] Transcript for <twilio-call-sid>: <user question 1> (chars=62)
May 07 15:42:19 node[10871]: [voice-call] AI response: <assistant response 1>
May 07 15:43:03 node[10871]: [voice-call] Transcript for <twilio-call-sid>: <user question 2> (chars=92)
May 07 15:43:11 node[10871]: [voice-call] AI response: <assistant response 2>
May 07 15:43:48 node[10871]: [voice-call] Transcript for <twilio-call-sid>: <user question 3> (chars=33)
May 07 15:43:53 node[10871]: [voice-call] AI response: <assistant response 3>
May 07 15:44:00 node[10871]: [voice-call] Reaping stale call <call-id> (age: 123s, state: speaking)
May 07 15:44:00 node[10871]: [MediaStream] Stream stopped: <stream-sid>
May 07 15:44:00 node[10871]: [voice-call] Media stream disconnected: <twilio-call-sid> (<stream-sid>)
May 07 15:44:01 node[10871]: [MediaStream] WebSocket closed (code: 1005, reason: none)

# Redacted call record progression from ~/.openclaw/voice-calls/calls.jsonl
{
  "provider": "twilio",
  "direction": "inbound",
  "state": "speaking",
  "sessionKey": "voice:<redacted>",
  "transcript": [
    { "speaker": "bot", "text": "Hello! How can I help you today?", "isFinal": true },
    { "speaker": "user", "text": "<user question 1>", "isFinal": true },
    { "speaker": "bot", "text": "<assistant response 1>", "isFinal": true },
    { "speaker": "user", "text": "<user question 2>", "isFinal": true },
    { "speaker": "bot", "text": "<assistant response 2>", "isFinal": true },
    { "speaker": "user", "text": "<user question 3>", "isFinal": true }
  ]
}
{
  "provider": "twilio",
  "direction": "inbound",
  "state": "hangup-bot",
  "endedAt": 1778193840531,
  "endReason": "hangup-bot"
}

Impact and severity

Affected: Twilio inbound voice-call users using streaming transcription conversation mode.
Severity: High for voice-call conversations; it terminates otherwise-working live calls.
Frequency: Observed once immediately after installing/enabling the current voice-call plugin and running a >120s multi-turn call. Prior frequency is NOT_ENOUGH_INFO.
Consequence: Active voice conversations can be cut off mid-call after ~120 seconds, causing failed conversations and extra Twilio call attempts/cost.

Additional information

This appears related to stale-call reaper behavior. The observed log says the call was reaped at age 123s while state: speaking, despite recent transcript and AI response activity. A possible mitigation is to configure a higher staleCallReaperSeconds or disable the reaper, but the issue is that an active conversation was classified as stale.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions