average-fireman-39457
12/04/2025, 3:36 PMtall-airline-16756
12/04/2025, 3:36 PMtall-airline-16756
12/04/2025, 3:37 PMtransfer_complete) in room metadata and ensure your dispatch rules or logic exclude rooms with that flag.
• Use one-time dispatch or explicit dispatch control: use one-time dispatch tokens (once=true) or avoid automatic dispatch entirely and dispatch agents only via your application logic so you control when agents can be assigned.
Troubleshooting suggestions (brief)
• Confirm await self.session.aclose() fully completes before your agent process exits.
• Check agent server logs to see whether the second call is a job recovery/restart vs a new dispatch.
• If the second invocation truly appears as the same job resuming, inspect job lifecycle / cleanup on the agent host.
If you’d like, tell me which prevention approach you prefer (delete room vs metadata flag vs explicit/one-time dispatch) and I’ll provide the exact API/SDK calls or a short code example for your Python SDK.
Sources: Job lifecycle | LiveKit docs | server-sdk-ruby | livekit/livekit_composite | DeepWiki