The union representing Costco Wholesale Corp. workers reached a new tentative agreement with the retailer, avoiding for now a strike by thousands of employees.