State officials had been working on crafting the tax exemption since the Legislature required it in the 2024 economic development measure that Gov. Maura Healey signed. But 18 months after that law was signed, the tax break comes at a fraught time for the artificial intelligence industry.