paperclipai/paperclip · error

execution-policy bootstrap: ${failedCompanyIds.length} of ${

Error message

execution-policy bootstrap: ${failedCompanyIds.length} of ${companyIds.length} companies failed to get a managed Kubernetes environment under executionMode=${bootstrap.executionMode}; refusing to start (companies: ${failedCompanyIds.join(", ")})

What it means

Error "execution-policy bootstrap: ${failedCompanyIds.length} of ${companyIds.length} companies failed to get a managed Kubernetes environment under executionMode=${bootstrap.executionMode}; refusing to start (companies: ${failedCompanyIds.join(", ")})" thrown in paperclipai/paperclip.

Source

Thrown at server/src/services/execution-policy-bootstrap.ts:176

        "failed to ensure managed Kubernetes environment during execution-policy bootstrap",
      );
      failedCompanyIds.push(companyId);
    }
  }

  logger.info(
    {
      executionMode: bootstrap.executionMode,
      companiesConfigured: configured,
      backend: bootstrap.kubernetesConfig.backend,
      runtimeClassName: bootstrap.kubernetesConfig.runtimeClassName,
      egressMode: bootstrap.kubernetesConfig.egressMode,
    },
    "applied forced Kubernetes execution policy",
  );

  if (failedCompanyIds.length > 0) {
    throw new Error(
      `execution-policy bootstrap: ${failedCompanyIds.length} of ${companyIds.length} companies failed to get a managed Kubernetes environment under executionMode=${bootstrap.executionMode}; refusing to start (companies: ${failedCompanyIds.join(", ")})`,
    );
  }

  return { executionMode: bootstrap.executionMode, companiesConfigured: configured };
}

/**
 * Convenience: parse + apply from a raw env map. Returns null when unrestricted.
 */
export async function bootstrapExecutionPolicyFromEnv(
  db: Db,
  env: ExecutionPolicyBootstrapEnv = process.env,
): Promise<{ executionMode: InstanceExecutionMode; companiesConfigured: number } | null> {
  const bootstrap = parseExecutionPolicyBootstrapEnv(env);
  if (!bootstrap) return null;
  return applyExecutionPolicyBootstrap(db, bootstrap);
}

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Fix the managed Kubernetes environment for the failed companies listed, or change executionMode so bootstrap is not required.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/services/execution-policy-bootstrap.ts:176 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/32d85198f648d877. Report an issue: GitHub.