{"record":{"id":"eebacc82e4c86969","repo":"paperclipai/paperclip","slug":"workspace-job-workspacecommand-name-can-only","errorCode":null,"errorMessage":"Workspace job \"${workspaceCommand.name}\" can only be run","messagePattern":"Workspace job \"(.+?)\" can only be run","errorType":"http","errorClass":null,"httpStatus":422,"severity":"error","filePath":"server/src/routes/execution-workspaces.ts","lineNumber":363,"sourceCode":"    const matchedRuntimeService =\n      workspaceCommand?.kind === \"service\" && !target.runtimeServiceId\n        ? matchWorkspaceRuntimeServiceToCommand(workspaceCommand, existing.runtimeServices ?? [])\n        : null;\n    const selectedRuntimeServiceId = target.runtimeServiceId ?? matchedRuntimeService?.id ?? null;\n    const selectedServiceIndex =\n      workspaceCommand?.kind === \"service\"\n        ? workspaceCommand.serviceIndex\n        : target.serviceIndex ?? null;\n    if (\n      selectedServiceIndex !== undefined\n      && selectedServiceIndex !== null\n      && (selectedServiceIndex < 0 || selectedServiceIndex >= configuredServices.length)\n    ) {\n      res.status(422).json({ error: \"Selected runtime service is not defined in this execution workspace runtime config\" });\n      return;\n    }\n    if (workspaceCommand?.kind === \"job\" && action !== \"run\") {\n      res.status(422).json({ error: `Workspace job \"${workspaceCommand.name}\" can only be run` });\n      return;\n    }\n    if (workspaceCommand?.kind === \"service\" && action === \"run\") {\n      res.status(422).json({ error: `Workspace service \"${workspaceCommand.name}\" should be started or restarted, not run` });\n      return;\n    }\n    if (action === \"run\" && !workspaceCommand) {\n      res.status(422).json({ error: \"Select a workspace job to run\" });\n      return;\n    }\n\n    if ((action === \"start\" || action === \"restart\") && !effectiveRuntimeConfig) {\n      res.status(422).json({ error: \"Execution workspace has no workspace command configuration or inherited project workspace default\" });\n      return;\n    }\n\n    let repairSeedSource: CanonicalWorktreeSeedSource | null = null;\n    let repairPreviousAttemptId: string | null = null;","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/routes/execution-workspaces.ts#L345-L381","documentation":"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.","triggerScenarios":"Thrown at server/src/routes/execution-workspaces.ts:253 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}