{"record":{"id":"05727654419a7ef7","repo":"oraios/serena","slug":"dashboard-is-not-running","errorCode":null,"errorMessage":"Dashboard is not running.","messagePattern":"Dashboard is not running\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/serena/agent.py","lineNumber":896,"sourceCode":"        log.debug(f\"Recording tool usage for tool '{tool_name}'\")\n        self._tool_usage_stats.record_tool_usage(tool_name, input_str, output_str)\n\n    def get_dashboard_url(self) -> str | None:\n        \"\"\"\n        :return: the URL of the web dashboard, or None if the dashboard is not running\n        \"\"\"\n        if self._dashboard_manager is None:\n            return None\n        return self._dashboard_manager.url\n\n    def open_dashboard(self) -> bool:\n        \"\"\"\n        Opens the Serena dashboard (for on-demand usage as triggered by the user, e.g. via a tool)\n\n        :return: True if the dashboard was opened, False if it could not be opened\n        \"\"\"\n        if self._dashboard_manager is None:\n            raise Exception(\"Dashboard is not running.\")\n\n        if not system_has_usable_display():\n            log.warning(\"Not opening the Serena web dashboard because no usable display was detected.\")\n            return False\n\n        self._dashboard_manager.open_dashboard_in_browser()\n        return True\n\n    def get_exposed_tool_instances(self) -> list[\"Tool\"]:\n        \"\"\"\n        :return: the tool instances which are exposed (e.g. to the MCP client).\n            Note that the set of exposed tools is fixed for the session, as\n            clients don't react to changes in the set of tools, so this is the superset\n            of tools that can be offered during the session.\n            If a client should attempt to use a tool that is dynamically disabled\n            (e.g. because a project is activated that disables it), it will receive an error.\n        \"\"\"\n        return list(self._exposed_tools.tools)","sourceCodeStart":878,"sourceCodeEnd":914,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/serena/agent.py#L878-L914","documentation":"Serena throws this from open_dashboard() when asked to open the web dashboard while no dashboard manager exists, i.e. the dashboard was not started (it must be enabled via --enable-web-dashboard at startup or config). The guard exists because the dashboard is an optional component that is only instantiated when dashboard mode is enabled. Calling open_dashboard in a session without it is a programming/config error, not a runtime failure.","triggerScenarios":"Calling agent.open_dashboard() (directly or via a tool such as the dashboard-related tool) on a SerenaAgent constructed without the dashboard manager enabled (web dashboard disabled in config/CLI).","commonSituations":"Running Serena with the web dashboard disabled (default in many MCP clients or non-interactive contexts) and then invoking the dashboard tool; starting the MCP server without --enable-web-dashboard; a tool definition still being exposed even though the dashboard backend is absent.","solutions":["Enable the dashboard: restart Serena with --enable-web-dashboard (or set enable_web_dashboard: true in serena_config.yml).","If the dashboard is intentionally disabled, do not call open_dashboard / hide the dashboard tool from the tool set.","Check agent._dashboard_manager is not None before calling open_dashboard and handle the disabled case gracefully."],"exampleFix":"// before\nagent.open_dashboard()\n// after\nif agent._dashboard_manager is not None:\n    agent.open_dashboard()\nelse:\n    log.warning('Dashboard disabled; start serena with --enable-web-dashboard')","handlingStrategy":"validation","validationCode":"def can_open_dashboard(agent) -> bool:\n    return getattr(agent, '_dashboard_manager', None) is not None","typeGuard":"def has_dashboard(agent) -> bool:\n    dm = getattr(agent, '_dashboard_manager', None)\n    return dm is not None and hasattr(dm, 'open_dashboard_in_browser')","tryCatchPattern":"try:\n    opened = agent.open_dashboard()\nexcept Exception:\n    log.warning('Dashboard not running; start serena with --enable-web-dashboard')\n    opened = False","preventionTips":["Always start Serena with --enable-web-dashboard if dashboard tools will be exposed/used.","Gate dashboard tool calls on dashboard availability (system_has_usable_display and manager presence).","Hide the dashboard tool in headless/CI sessions where the dashboard is disabled."],"tags":["dashboard","configuration","optional-component"],"backgroundTag":"feature-not-enabled","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}