From ea5e0ced3ce79e31ef44a726b514be3a49c291eb Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 18 Jul 2025 11:36:01 +0200 Subject: [PATCH] Catch all project activation errors for initial project --- src/serena/agent.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/serena/agent.py b/src/serena/agent.py index ece6fdc..15d7ce0 100644 --- a/src/serena/agent.py +++ b/src/serena/agent.py @@ -212,11 +212,8 @@ class SerenaAgent: if project is not None: try: self.activate_project_from_path_or_name(project) - except ProjectNotFoundError as e: - log.error( - f"Error activating project '{project}': {e}; Note that out-of-project configurations were migrated. " - "You should now pass either --project or --project ." - ) + except Exception as e: + log.error(f"Error activating project '{project}' at startup: {e}") def record_tool_usage_if_enabled(self, input_kwargs: dict, tool_result: str | dict, tool: Tool) -> None: """