From fe1026ee8a421926d9b037486442b49fbcb43585 Mon Sep 17 00:00:00 2001 From: Tim O'Farrell Date: Wed, 24 Dec 2025 12:13:29 -0700 Subject: [PATCH] Fix for re-creating deleted conversation (#12152) --- openhands/app_server/event_callback/webhook_router.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openhands/app_server/event_callback/webhook_router.py b/openhands/app_server/event_callback/webhook_router.py index 28236b7325..37ae9d89b2 100644 --- a/openhands/app_server/event_callback/webhook_router.py +++ b/openhands/app_server/event_callback/webhook_router.py @@ -42,7 +42,7 @@ from openhands.app_server.user.specifiy_user_context import ( ) from openhands.app_server.user.user_context import UserContext from openhands.integrations.provider import ProviderType -from openhands.sdk import Event +from openhands.sdk import ConversationExecutionStatus, Event from openhands.sdk.event import ConversationStateUpdateEvent from openhands.server.user_auth.default_user_auth import DefaultUserAuth from openhands.server.user_auth.user_auth import ( @@ -111,6 +111,11 @@ async def on_conversation_update( conversation_info.id, sandbox_info, app_conversation_info_service ) + # If the conversation is being deleted, no action is required... + # Later we may consider deleting the conversation if it exists... + if conversation_info.execution_status == ConversationExecutionStatus.DELETING: + return Success() + app_conversation_info = AppConversationInfo( id=conversation_info.id, title=existing.title or f'Conversation {conversation_info.id.hex}',