BloopAI/vibe-kanban · error
Failed to run archive script
Error message
Failed to run archive script
What it means
The RunArchiveScript workspace action calls workspacesApi.runArchiveScript and throws this generic Error when the backend returns success=false with an error payload that is neither 'no_script_configured' nor 'process_already_running'. It is the fallback branch for any archive-script execution failure not covered by the two specific cases (e.g. the script exited non-zero, the backend process spawn failed, or an internal server error).
Source
Thrown at packages/web-core/src/shared/actions/index.ts:1216
RunArchiveScript: {
id: 'run-archive-script',
label: 'Run Archive Script',
icon: TerminalIcon,
shortcut: 'R A',
requiresTarget: ActionTargetType.WORKSPACE,
isVisible: (ctx) => ctx.hasWorkspace,
isEnabled: (ctx) => !ctx.isAttemptRunning,
execute: async (_ctx, workspaceId) => {
const result = await workspacesApi.runArchiveScript(workspaceId);
if (!result.success) {
if (result.error?.type === 'no_script_configured') {
throw new Error('No archive script configured for this project');
}
if (result.error?.type === 'process_already_running') {
throw new Error('Cannot run script while another process is running');
}
throw new Error('Failed to run archive script');
}
},
} satisfies WorkspaceActionDefinition,
// === Issue Actions ===
CreateIssue: {
id: 'create-issue',
label: 'Create Issue',
icon: PlusIcon,
shortcut: 'I C',
requiresTarget: ActionTargetType.NONE,
isVisible: (ctx) => ctx.layoutMode === 'kanban' && !ctx.isCreatingIssue,
execute: (ctx) => {
ctx.navigateToCreateIssue({ statusId: ctx.defaultCreateStatusId });
},
} satisfies GlobalActionDefinition,
ChangeIssueStatus: {View on GitHub (pinned to 4deb7eca8f)
Solutions
- Open the project settings and run the archive script manually in a terminal to see its actual exit code and stderr — the script itself is most likely failing
- Check that the script path configured for the project exists and is executable (chmod +x) and that its interpreter/shebang is installed
- Restart the backend and retry, in case the failure was a transient spawn error
- Update the frontend/backend to matching versions if a new error.type was recently added to the API
Example fix
// before
throw new Error('Failed to run archive script');
// after
throw new Error(
`Failed to run archive script: ${result.error?.message ?? result.error?.type ?? 'unknown error'}`
); Defensive patterns
Strategy: try-catch
Validate before calling
const isEnabled = !ctx.isAttemptRunning; const hasScript = result.error?.type !== 'no_script_configured'; // check project settings before invoking
Type guard
function isScriptRunFailure(r: unknown): r is { success: false; error?: { type: string } } {
return typeof r === 'object' && r !== null && 'success' in r &&
(r as any).success === false;
} Try / catch
try {
await workspacesApi.runArchiveScript(workspaceId);
} catch (e) {
showToast((e as Error).message);
// Inspect the script's exit status in backend logs to find the real cause.
} Prevention
- Test the archive script in a terminal before wiring it into the project settings
- Ensure the script is executable and its interpreter is installed
- Never invoke script actions while an attempt is running (respect ctx.isAttemptRunning)
- Surface result.error.type in the thrown message instead of a generic string
When it happens
Trigger: Invoking the 'Run Archive Script' command (shortcut R A) on a workspace where the backend's archive-script run fails for any reason other than 'no script configured' or 'another process running' — typically the configured script itself exits with a non-zero exit code, the script binary/interpreter is missing, or the backend returns an unrecognized error type.
Common situations: A project's archive script has a bug or references files that don't exist; the script's shebang/interpreter isn't installed in the execution environment; backend lacks permission to execute the script file; a backend version returns a new error.type the frontend doesn't map; transient backend failure while spawning the process.
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/0aa3cda45aaa1406.
Report an issue: GitHub.