ITADN

Agent goes dead after AWS Bedrock session recycle (LK_SESSION_MAX_DURATION)

#5879Openyashrank4 创建于 2026-05-28
bug
Y
yashrank4commented
### Bug Description AWS Bedrock Nova Sonic has an 8-minute hard session limit. Check LK_SESSION_MAX_DURATION. The plugin's `_graceful_session_recycle()` internally calls `initialize_streams(is_restart=True)` which reopens the Bedrock stream and replays the full `_chat_ctx` as history into the new session. **Problem** When the Bedrock session recycles at the 450s mark, the agent goes dead. The LiveKit `AgentSession` is still alive, the room is still connected, the caller is still on the line — but the agent stops responding entirely. It does not speak, does not react to user utterances, and the call hangs silently until the watchdog or the caller disconnects. ### Expected Behavior **Expected Behavior** After the Bedrock WebSocket recycles, the agent should resume the conversation and continue responding to the caller naturally. **Actual Behavior** Agent goes completely silent. No errors are thrown to the application level. The `AgentSession` does not emit a recoverable error event. The call hangs until timeout. ### Reproduction Steps ```bash 1. Start a call using Nova Sonic (`amazon.nova-2-sonic-v1:0`) 2. Keep the caller on the line for 7.5+ minutes 3. Observe the Bedrock session recycle at`LK_SESSION_MAX_DURATION`seconds 4. Agent stops responding to all user input after the recycle ``` ### Operating System MacOs 26.5 | Linux ### Models Used AWS Nova Sonic 2 Realtime ### Package Versions ```bash livekit 1.1.8 livekit-agents 1.5.11 livekit-api 1.1.0 livekit-plugins-aws 1.5.11 livekit-protocol 1.1.9 ``` ### Session/Room/Call IDs _No response_ ### Proposed Solution ```python ``` ### Additional Context _No response_ ### Screenshots and Recordings _No response_
1 条评论