paperclipai/paperclip · error · ToolGatewayHttpError

local_stdio_template_invalid

local_stdio_template_invalid

Error message

Local stdio MCP connection requires an active approved template

What it means

resolveLocalStdioRuntimeTemplate could not produce a usable template: the referenced template is neither a built-in nor an active approved row in toolStdioCommandTemplates for the company. Local stdio runs are only allowed from active approved templates, so execution stops before spawning any process.

Source

Thrown at server/src/services/tool-gateway.ts:2692

  ): Promise<string> {
    const accessContext = {
      consumerType: "tool_connection" as const,
      consumerId: connection.id,
      configPath,
      actorType: "system" as const,
      actorId: session.agentId,
      responsibleUserId: grant.subjectUserId,
      issueId: session.issueId,
      heartbeatRunId: session.runId,
    };
    if (grant.kind !== "user") {
      return secrets.resolveSecretValue(
        connection.companyId,
        ref.secretId,
        ref.versionSelector ?? "latest",
        { accessContext },
      );
    }
    if (!grant.subjectUserId) {
      throw new ToolGatewayHttpError(422, "Personal authorization has no owner", "grant_owner_missing", {
        connectionId: connection.id,
        grantId: grant.id,
      });
    }
    const [secret] = await db.select({
      scope: companySecrets.scope,
      ownerUserId: companySecrets.ownerUserId,
      userSecretDefinitionId: companySecrets.userSecretDefinitionId,
    }).from(companySecrets).where(and(
      eq(companySecrets.id, ref.secretId),
      eq(companySecrets.companyId, connection.companyId),
    )).limit(1);
    if (
      !secret
      || secret.scope !== "user"
      || secret.ownerUserId !== grant.subjectUserId

View on GitHub (pinned to 01ad858492)

Solutions

  1. Approve (or re-approve) the stdio template referenced by the connection; inactive or unapproved templates cannot launch.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/tool-gateway.ts:2596 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/570e4d305d4780e5. Report an issue: GitHub.