paperclipai/paperclip · error
Workspace job "${workspaceCommand.name}" can only be run
Error message
Workspace job "${workspaceCommand.name}" can only be run What it means
422 from the runtime command handler: the resolved workspace command has kind 'job', but the requested action is not 'run'; jobs only support the run action.
Source
Thrown at server/src/routes/execution-workspaces.ts:363
const matchedRuntimeService =
workspaceCommand?.kind === "service" && !target.runtimeServiceId
? matchWorkspaceRuntimeServiceToCommand(workspaceCommand, existing.runtimeServices ?? [])
: null;
const selectedRuntimeServiceId = target.runtimeServiceId ?? matchedRuntimeService?.id ?? null;
const selectedServiceIndex =
workspaceCommand?.kind === "service"
? workspaceCommand.serviceIndex
: target.serviceIndex ?? null;
if (
selectedServiceIndex !== undefined
&& selectedServiceIndex !== null
&& (selectedServiceIndex < 0 || selectedServiceIndex >= configuredServices.length)
) {
res.status(422).json({ error: "Selected runtime service is not defined in this execution workspace runtime config" });
return;
}
if (workspaceCommand?.kind === "job" && action !== "run") {
res.status(422).json({ error: `Workspace job "${workspaceCommand.name}" can only be run` });
return;
}
if (workspaceCommand?.kind === "service" && action === "run") {
res.status(422).json({ error: `Workspace service "${workspaceCommand.name}" should be started or restarted, not run` });
return;
}
if (action === "run" && !workspaceCommand) {
res.status(422).json({ error: "Select a workspace job to run" });
return;
}
if ((action === "start" || action === "restart") && !effectiveRuntimeConfig) {
res.status(422).json({ error: "Execution workspace has no workspace command configuration or inherited project workspace default" });
return;
}
let repairSeedSource: CanonicalWorktreeSeedSource | null = null;
let repairPreviousAttemptId: string | null = null;View on GitHub (pinned to a7e689b3c3)
Solutions
- This is an authorization rule, not a bug: perform the action with an actor that satisfies the stated constraint (board user, the owning agent, or an in-scope resource).
- If access should be allowed, verify the actor's credentials/company scope and the resource's ownership before retrying.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/src/routes/execution-workspaces.ts:253 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-18).
Data as JSON: /api/errors/eebacc82e4c86969.
Report an issue: GitHub.