{"record":{"id":"c144660ab2bfd859","repo":"BloopAI/vibe-kanban","slug":"workspace-has-no-repositories-configured-c14466","errorCode":null,"errorMessage":"Workspace has no repositories configured","messagePattern":"Workspace has no repositories configured","errorType":"validation","errorClass":"ContainerError","httpStatus":null,"severity":"error","filePath":"crates/services/src/services/container.rs","lineNumber":1145,"sourceCode":"            .await?\n        };\n\n        Ok(execution_process)\n    }\n\n    async fn start_execution(\n        &self,\n        workspace: &Workspace,\n        session: &Session,\n        executor_action: &ExecutorAction,\n        run_reason: &ExecutionProcessRunReason,\n    ) -> Result<ExecutionProcess, ContainerError> {\n        // Create new execution process record\n        // Capture current HEAD per repository as the \"before\" commit for this execution\n        let repositories =\n            WorkspaceRepo::find_repos_for_workspace(&self.db().pool, workspace.id).await?;\n        if repositories.is_empty() {\n            return Err(ContainerError::Other(anyhow!(\n                \"Workspace has no repositories configured\"\n            )));\n        }\n\n        let workspace_root = workspace\n            .container_ref\n            .as_ref()\n            .map(std::path::PathBuf::from)\n            .ok_or_else(|| ContainerError::Other(anyhow!(\"Container ref not found\")))?;\n\n        let mut repo_states = Vec::with_capacity(repositories.len());\n        for repo in &repositories {\n            let repo_path = workspace_root.join(&repo.name);\n            let before_head_commit = self.git().get_head_info(&repo_path).ok().map(|h| h.oid);\n            repo_states.push(CreateExecutionProcessRepoState {\n                repo_id: repo.id,\n                before_head_commit,\n                after_head_commit: None,","sourceCodeStart":1127,"sourceCodeEnd":1163,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/services/src/services/container.rs#L1127-L1163","documentation":"start_execution requires the workspace to have at least one repository configured, because each execution captures per-repo HEAD state (ExecutionProcessRepoState). If WorkspaceRepo::find_repos_for_workspace returns an empty list, the execution cannot proceed and this error is returned.","triggerScenarios":"Any call chain that reaches start_execution (follow_up, start_review, run_setup_script, run_codex_setup, run_cursor_setup, start_queued_follow_up) for a workspace with zero rows in workspace_repos.","commonSituations":"Creating a workspace without adding repos via the repos API; the repo association row was deleted; workspace created from an empty/failed project setup; running a review or follow-up on a workspace where repo setup never completed.","solutions":["Add at least one repository to the workspace before starting executions.","Check workspace_repos rows for the workspace id to confirm associations exist.","Re-run the workspace/project creation flow so repos get attached.","If the workspace is genuinely empty, don't start executions on it — guard the call first."],"exampleFix":"// before\nlet process = container.start_execution(&workspace, cmd, ...).await?;\n// after\nlet repos = WorkspaceRepo::find_repos_for_workspace(&pool, workspace.id).await?;\nif repos.is_empty() {\n    anyhow::bail!(\"workspace {} has no repos; attach one before starting execution\", workspace.id);\n}\nlet process = container.start_execution(&workspace, cmd, ...).await?;","handlingStrategy":"validation","validationCode":"let repos = WorkspaceRepo::find_repos_for_workspace(&pool, workspace.id).await?;\nif repos.is_empty() {\n    anyhow::bail!(\"attach a repository to workspace {} before running tasks\", workspace.id);\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"no repositories configured\") => prompt_user_to_attach_repo(),\n    other => other,\n}","preventionTips":["Always complete the repo-attachment step of workspace creation before enabling run/follow-up actions.","Disable 'run'/'review' buttons in UI while the workspace has zero repos.","Monitor workspace_repos for rows deleted unexpectedly."],"tags":["workspace","configuration","precondition"],"backgroundTag":"workspace-missing-repositories","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}