BloopAI/vibe-kanban · error · Error
Action "${action.id}" requires both workspace and repository
Error message
Action "${action.id}" requires both workspace and repository What it means
For actions with requiresTarget === ActionTargetType.GIT, executeAction requires BOTH a workspaceId and a repoIdOrProjectId; if either is missing it throws 'Action "<id>" requires both workspace and repository'. Git actions operate on a repository inside a workspace, so both identifiers are mandatory.
Source
Thrown at packages/web-core/src/shared/providers/ActionsProvider.tsx:290
): Promise<void> => {
try {
switch (action.requiresTarget) {
case ActionTargetType.NONE:
await action.execute(executorContext);
break;
case ActionTargetType.WORKSPACE:
if (!workspaceId) {
throw new Error(
`Action "${action.id}" requires a workspace target`
);
}
await action.execute(executorContext, workspaceId);
break;
case ActionTargetType.GIT:
if (!workspaceId || !repoIdOrProjectId) {
throw new Error(
`Action "${action.id}" requires both workspace and repository`
);
}
await action.execute(
executorContext,
workspaceId,
repoIdOrProjectId
);
break;
case ActionTargetType.ISSUE:
if (!repoIdOrProjectId || !issueIds || issueIds.length === 0) {
throw new Error(
`Action "${action.id}" requires project and issue selection`
);
}
await action.execute(executorContext, repoIdOrProjectId, issueIds);
break;View on GitHub (pinned to 4deb7eca8f)
Solutions
- Ensure the action is only offered from the workspace's repository view where both workspace and repo are known.
- Pass both workspaceId and repoIdOrProjectId explicitly to executeAction.
- Gate the action handler: verify both identifiers exist before dispatching, otherwise show a selection prompt.
Example fix
// before executeAction(action); // after if (!currentWorkspaceId || !repoIdOrProjectId) return; executeAction(action, currentWorkspaceId, repoIdOrProjectId);
Defensive patterns
Strategy: validation
Validate before calling
if (action.requiresTarget === ActionTargetType.GIT && (!workspaceId || !repoIdOrProjectId)) {
return; // both workspace and repo must be selected
}
executeAction(action, workspaceId, repoIdOrProjectId); Try / catch
try {
await executeAction(action, workspaceId, repoIdOrProjectId);
} catch (err) {
if (err instanceof Error && err.message.includes('requires both workspace and repository')) {
promptUserToSelectRepository();
}
} Prevention
- Render GIT actions only within the workspace repository view
- Disable action buttons until both workspace and repo selections are loaded
- Reset pending actions when repo selection is cleared
When it happens
Trigger: Calling executeAction for a GIT action when workspaceId is undefined (no active workspace) or repoIdOrProjectId is undefined (no repository/project selected in the workspace view).
Common situations: Running git actions (branch, commit, PR creation) from a context menu whose repo selection hasn't loaded yet; triggering from outside the workspace repository view; clearing repo selection then firing the action via shortcut.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Action "${action.id}" requires a workspace target
- Action "${action.id}" requires project and issue selection
- result.error
- Provide `prompt`, or `issue_id` that has a non-empty title/d
- Failed to list projects (${res.status})
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/2528e4acae74e21f.
Report an issue: GitHub.