oraios/serena · critical · ServerNotFoundError

Found no Serena service in a JetBrains IDE instance for the

Error message

Found no Serena service in a JetBrains IDE instance for the project at {project_root}. STOP. Do not attempt any other tools or workarounds. Ask the user to open this folder as a project in a JetBrains IDE with the Serena plugin installed and running!

What it means

JetBrainsPluginClient.find_client queries running JetBrains IDE instances for the Serena plugin service registered for the given project root. When no IDE/plugin instance matches the project path, it raises ServerNotFoundError with explicit instructions to stop and ask the user to open the project in a JetBrains IDE with the Serena plugin running.

Source

Thrown at src/serena/jetbrains/jetbrains_plugin_client.py:129

        :param log_warning: whether to log a warning if no matching plugin instance is found
        :return: the instance
        """
        plugin_paths_found = []
        for future in self._submit_scan():
            client = future.result()
            if client.matches(project_root):
                return client
            elif client.project_root is not None:
                plugin_paths_found.append(client.project_root)

        if log_warning:
            log.warning(
                "Searched for Serena JetBrains plugin service for project at %s but found no matching service. "
                "Found plugin instances for the following project paths: %s",
                project_root,
                plugin_paths_found,
            )
        raise ServerNotFoundError(
            f"Found no Serena service in a JetBrains IDE instance for the project at {project_root}. "
            "STOP. Do not attempt any other tools or workarounds. Ask the user to open this folder as a project in a JetBrains IDE "
            "with the Serena plugin installed and running!"
        )

    def match_clients(self, registered_projects: list[RegisteredProject]) -> list[MatchedClient]:
        """
        Scans for plugin instances and matches them against the given registered projects.

        :param registered_projects: the list of registered projects to match plugin instances against
        :return: the list of matched clients with their corresponding registered project
        """
        matched_clients = []
        for future in self._submit_scan():
            client = future.result()
            if client.project_root is not None:
                for rp in registered_projects:
                    if client.matches(Path(rp.project_root)):

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Open the project folder in a JetBrains IDE with the Serena plugin installed and enabled (as the message instructs)
  2. Verify the project root path exactly matches what the IDE has open (avoid symlinks/case differences)
  3. Check the plugin is installed and enabled: Settings > Plugins > Serena, and restart the IDE
  4. Confirm the plugin's service is reachable and the plugin version is compatible with your serena client
Defensive patterns

Strategy: fallback

Validate before calling

# before invoking JetBrains mode, sanity-check the environment:
import os
assert os.path.isdir(project_root), "project root must exist"
# and confirm the IDE is running with the project open (user check) and the Serena plugin enabled

Try / catch

try:
    client = JetBrainsPluginClient.from_project(registered_project)
except ServerNotFoundError:
    # per the message: stop and ask the user to open the project in a JetBrains IDE
    ask_user_to_open_project_in_ide(project_root)
    client = retry_later()

Prevention

When it happens

Trigger: Calling from_project/find_client when no JetBrains IDE is running; IDE is running but the Serena plugin is not installed/disabled; project open in the IDE under a different path (symlink, case mismatch, different mount point) than project_root passed to Serena.

Common situations: Using serena's JetBrains mode from a terminal while the IDE is closed; plugin not updated/enabled after IDE restart; opening the project via a symlinked or differently-cased directory path; multiple IDE instances where only other projects are open.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/f2ef61001f0ab739. Report an issue: GitHub.