microsoft/autogen · error · RuntimeError

Actor is not initialized. Please check the server connection

Error message

Actor is not initialized. Please check the server connection.

What it means

Error "Actor is not initialized. Please check the server connection." thrown in microsoft/autogen.

Source

Thrown at python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py:280

        self._host = host

        # self._session: ClientSession | None = None
        self._actor: McpSessionActor | None = None
        self._actor_loop: asyncio.AbstractEventLoop | None = None
        self._read = None
        self._write = None

    @property
    def server_params(self) -> McpServerParams:
        return self._server_params

    async def list_tools(self) -> List[ToolSchema]:
        if not self._actor:
            await self.start()  # fallback to start the actor if not initialized instead of raising an error
            # Why? Because when deserializing the workbench, the actor might not be initialized yet.
            # raise RuntimeError("Actor is not initialized. Call start() first.")
        if self._actor is None:
            raise RuntimeError("Actor is not initialized. Please check the server connection.")
        result_future = await self._actor.call("list_tools", None)
        list_tool_result = await result_future
        assert isinstance(
            list_tool_result, ListToolsResult
        ), f"list_tools must return a CallToolResult, instead of : {str(type(list_tool_result))}"
        schema: List[ToolSchema] = []
        for tool in list_tool_result.tools:
            original_name = tool.name
            name = original_name
            description = tool.description or ""

            # Apply overrides if they exist for this tool
            if original_name in self._tool_overrides:
                override = self._tool_overrides[original_name]
                if override.name is not None:
                    name = override.name
                if override.description is not None:
                    description = override.description

View on GitHub (pinned to 027ecf0a37)

Solutions

  1. Start/initialize the workbench first

Example fix

await workbench.start() before listing/calling tools

When it happens

Trigger: Thrown at python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py:280 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15). Data as JSON: /api/errors/90371fa6dbb21505. Report an issue: GitHub.