{"record":{"id":"f0cf89c46f3b3c89","repo":"paperclipai/paperclip","slug":"select-a-workspace-job-to-run","errorCode":null,"errorMessage":"Select a workspace job to run","messagePattern":"Select a workspace job to run","errorType":"http","errorClass":null,"httpStatus":422,"severity":"error","filePath":"server/src/routes/execution-workspaces.ts","lineNumber":371,"sourceCode":"        : 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;\n    let repairCliArgs: string[] | null = null;\n    if (action === \"repair\") {\n      const manifestPath = path.join(workspaceCwd, \".paperclip\", \"seed-manifest.json\");\n      let manifest: {\n        attemptId?: unknown;\n        source?: { configPath?: unknown; instanceId?: unknown };\n        targetInstanceId?: unknown;\n      };","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/routes/execution-workspaces.ts#L353-L389","documentation":"422 from the runtime command handler: no workspace command (job or service) could be resolved from the request, and the action requires a command target to operate on.","triggerScenarios":"Thrown at server/src/routes/execution-workspaces.ts:261 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the request so it satisfies the condition stated in the error message, then retry; see the throwing line in the named file for the exact check."],"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"}