paperclipai/paperclip · error

Select a workspace job to run

Error message

Select a workspace job to run

What it means

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.

Source

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

        : 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: {
        attemptId?: unknown;
        source?: { configPath?: unknown; instanceId?: unknown };
        targetInstanceId?: unknown;
      };

View on GitHub (pinned to a7e689b3c3)

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:261 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/f0cf89c46f3b3c89. Report an issue: GitHub.