{"record":{"id":"4a082c80ee24fc35","repo":"BloopAI/vibe-kanban","slug":"no-cleanup-script-configured-for-this-project","errorCode":null,"errorMessage":"No cleanup script configured for this project","messagePattern":"No cleanup script configured for this project","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/web-core/src/shared/actions/index.ts","lineNumber":1189,"sourceCode":"        }\n        throw new Error('Failed to run setup script');\n      }\n    },\n  },\n\n  RunCleanupScript: {\n    id: 'run-cleanup-script',\n    label: 'Run Cleanup Script',\n    icon: TerminalIcon,\n    shortcut: 'R C',\n    requiresTarget: ActionTargetType.WORKSPACE,\n    isVisible: (ctx) => ctx.hasWorkspace,\n    isEnabled: (ctx) => !ctx.isAttemptRunning,\n    execute: async (_ctx, workspaceId) => {\n      const result = await workspacesApi.runCleanupScript(workspaceId);\n      if (!result.success) {\n        if (result.error?.type === 'no_script_configured') {\n          throw new Error('No cleanup script configured for this project');\n        }\n        if (result.error?.type === 'process_already_running') {\n          throw new Error('Cannot run script while another process is running');\n        }\n        throw new Error('Failed to run cleanup script');\n      }\n    },\n  },\n\n  RunArchiveScript: {\n    id: 'run-archive-script',\n    label: 'Run Archive Script',\n    icon: TerminalIcon,\n    shortcut: 'R A',\n    requiresTarget: ActionTargetType.WORKSPACE,\n    isVisible: (ctx) => ctx.hasWorkspace,\n    isEnabled: (ctx) => !ctx.isAttemptRunning,\n    execute: async (_ctx, workspaceId) => {","sourceCodeStart":1171,"sourceCodeEnd":1207,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/packages/web-core/src/shared/actions/index.ts#L1171-L1207","documentation":"Thrown by the RunCleanupScript action when workspacesApi.runCleanupScript returns success:false with error.type === 'no_script_configured'. The backend has no cleanup script registered for the project, so the request is rejected before any process starts.","triggerScenarios":"Executing RunCleanupScript on a workspace whose project defines no cleanup script (cleanup_script null/empty), producing the structured { success: false, error: { type: 'no_script_configured' } } response.","commonSituations":"Projects that only define a setup script, users assuming a default cleanup script exists, or project configs migrated from versions before cleanup scripts were introduced.","solutions":["Define a cleanup script in the project configuration if cleanup automation is desired.","Hide/disable the RunCleanupScript action when no cleanup script is configured.","Confirm the correct project is selected — script configuration is per-project.","If the script was just added, refresh the project data before invoking the action."],"exampleFix":"// before\nisVisible: (ctx) => ctx.hasWorkspace,\n// after\nisVisible: (ctx) => ctx.hasWorkspace && ctx.hasCleanupScript,","handlingStrategy":"validation","validationCode":"// before running\nconst ctx = getWorkspaceContext(workspaceId);\nif (!ctx.hasWorkspace) return;\nif (!ctx.project.cleanupScript) {\n  toast.info('No cleanup script configured for this project');\n  return;\n}\nawait workspacesApi.runCleanupScript(workspaceId);","typeGuard":"function isNoScriptError(result: RunScriptResult): boolean {\n  return result.success === false && result.error?.type === 'no_script_configured';\n}","tryCatchPattern":"try {\n  const result = await workspacesApi.runCleanupScript(workspaceId);\n  if (!result.success && result.error?.type === 'no_script_configured') {\n    toast.info('Add a cleanup script in project settings first.');\n    return;\n  }\n  if (!result.success) throw new Error(result.error?.message ?? 'Failed to run cleanup script');\n} catch (err) {\n  toast.error(String(err));\n}","preventionTips":["Define a cleanup script in project settings if you want automated cleanup.","Hide cleanup actions for projects that define no cleanup script.","Branch on error.type instead of parsing the error message.","Verify which project you are operating on before invoking script actions."],"tags":["configuration","script","workspace"],"backgroundTag":"missing-script-configuration","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}