diff --git a/src/core/tools/ExecuteCommandTool.ts b/src/core/tools/ExecuteCommandTool.ts index ffc75e4a9f..2f6b1008a6 100644 --- a/src/core/tools/ExecuteCommandTool.ts +++ b/src/core/tools/ExecuteCommandTool.ts @@ -700,6 +700,7 @@ async function executeServiceCommand( } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error) serviceHandle.status = "failed" + ServiceManager.notifyStatusChange(serviceHandle) const status: CommandExecutionStatus = { executionId, status: "service_failed", @@ -763,6 +764,7 @@ async function waitForPattern( // Timeout check if (Date.now() - startTime > timeoutMs) { serviceHandle.status = "failed" + ServiceManager.notifyStatusChange(serviceHandle) clearInterval(checkInterval) reject(new Error(`Service ready pattern not matched within ${timeoutMs}ms`)) } diff --git a/src/integrations/terminal/ServiceManager.ts b/src/integrations/terminal/ServiceManager.ts index 65bd52568e..8435ba3129 100644 --- a/src/integrations/terminal/ServiceManager.ts +++ b/src/integrations/terminal/ServiceManager.ts @@ -323,7 +323,7 @@ export class ServiceManager { /** * Notify status change */ - private static notifyStatusChange(serviceHandle: ServiceHandle): void { + static notifyStatusChange(serviceHandle: ServiceHandle): void { for (const callback of this.statusChangeCallbacks) { try { callback(serviceHandle)