{"record":{"id":"5298a92c9c2ee32c","repo":"paperclipai/paperclip","slug":"workspace-command-action-not-found","errorCode":null,"errorMessage":"Workspace command action not found","messagePattern":"Workspace command action not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/src/routes/execution-workspaces.ts","lineNumber":271,"sourceCode":"      expiresAt: result.issuance.expiresAt,\n      mode: \"handoff\",\n    });\n  });\n\n  router.get(\"/execution-workspaces/:id/workspace-operations\", async (req, res) => {\n    const id = req.params.id as string;\n    const workspace = await getAccessibleResource(req, res, svc.getById(id), \"Execution workspace not found\");\n    if (!workspace) return;\n    if (!(await assertExecutionWorkspaceReadAllowed(req, res, workspace.companyId))) return;\n    const operations = await workspaceOperationsSvc.listForExecutionWorkspace(id);\n    res.json(operations);\n  });\n\n  async function handleExecutionWorkspaceRuntimeCommand(req: Request, res: Response) {\n    const id = req.params.id as string;\n    const action = String(req.params.action ?? \"\").trim().toLowerCase();\n    if (action !== \"start\" && action !== \"stop\" && action !== \"restart\" && action !== \"repair\" && action !== \"run\") {\n      res.status(404).json({ error: \"Workspace command action not found\" });\n      return;\n    }\n\n    const existing = await getAccessibleResource(req, res, svc.getById(id), \"Execution workspace not found\");\n    if (!existing) return;\n    if (!(await assertRuntimeManageAllowed(req, res, existing.companyId))) return;\n\n    const authorization = await assertCanManageExecutionWorkspaceRuntimeServices(db, req, {\n      companyId: existing.companyId,\n      executionWorkspaceId: existing.id,\n      sourceIssueId: existing.sourceIssueId,\n    });\n\n    const workspaceCwd = existing.cwd;\n    if (!workspaceCwd) {\n      res.status(422).json({ error: \"Execution workspace needs a local path before Paperclip can run workspace commands\" });\n      return;\n    }","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/routes/execution-workspaces.ts#L253-L289","documentation":"The runtime-command handler found no workspace command matching the requested action target; the action references a command that is not defined for this execution workspace, so the operation 404s before any service control runs.","triggerScenarios":"Thrown at server/src/routes/execution-workspaces.ts:155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the id in the request path or body refers to an existing record in this company; re-list the parent collection to get a valid id.","Check that the record was not deleted or archived, and that the request is scoped to the correct companyId."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-21T17:58:32.592Z","contentChangedAt":"2026-08-21T17:58:32.592Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}