paperclipai/paperclip · error

Workspace service " " should be started or restarted, not…

Error message

Workspace service "${workspaceCommand.name}" should be started or restarted, not run

What it means

422 from the runtime command handler: the resolved workspace command has kind 'service', and services must be started or restarted rather than invoked with the run action.

Solutions

  1. 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.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/execution-workspaces.ts:257 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/19117634933dd9c8. Report an issue: GitHub.

Appendix: source

Thrown at server/src/routes/execution-workspaces.ts:367

    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;
    let repairCliArgs: string[] | null = null;
    if (action === "repair") {
      const manifestPath = path.join(workspaceCwd, ".paperclip", "seed-manifest.json");
      let manifest: {

View on GitHub (pinned to a7e689b3c3)