{"record":{"id":"90371fa6dbb21505","repo":"microsoft/autogen","slug":"actor-is-not-initialized-please-check-the-server","errorCode":null,"errorMessage":"Actor is not initialized. Please check the server connection.","messagePattern":"Actor is not initialized\\. Please check the server connection\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py","lineNumber":280,"sourceCode":"        self._host = host\n\n        # self._session: ClientSession | None = None\n        self._actor: McpSessionActor | None = None\n        self._actor_loop: asyncio.AbstractEventLoop | None = None\n        self._read = None\n        self._write = None\n\n    @property\n    def server_params(self) -> McpServerParams:\n        return self._server_params\n\n    async def list_tools(self) -> List[ToolSchema]:\n        if not self._actor:\n            await self.start()  # fallback to start the actor if not initialized instead of raising an error\n            # Why? Because when deserializing the workbench, the actor might not be initialized yet.\n            # raise RuntimeError(\"Actor is not initialized. Call start() first.\")\n        if self._actor is None:\n            raise RuntimeError(\"Actor is not initialized. Please check the server connection.\")\n        result_future = await self._actor.call(\"list_tools\", None)\n        list_tool_result = await result_future\n        assert isinstance(\n            list_tool_result, ListToolsResult\n        ), f\"list_tools must return a CallToolResult, instead of : {str(type(list_tool_result))}\"\n        schema: List[ToolSchema] = []\n        for tool in list_tool_result.tools:\n            original_name = tool.name\n            name = original_name\n            description = tool.description or \"\"\n\n            # Apply overrides if they exist for this tool\n            if original_name in self._tool_overrides:\n                override = self._tool_overrides[original_name]\n                if override.name is not None:\n                    name = override.name\n                if override.description is not None:\n                    description = override.description","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py#L262-L298","documentation":"Error \"Actor is not initialized. Please check the server connection.\" thrown in microsoft/autogen.","triggerScenarios":"Thrown at python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py:280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Start/initialize the workbench first"],"exampleFix":"await workbench.start() before listing/calling tools","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}