Catalyzes the hydrolysis of acyl-CoAs into free fatty acids and coenzyme A (CoASH), regulating their respective intracellular levels (PubMed:16934754, PubMed:19170545). Has acyl-CoA thioesterase activity towards medium (C12) and long-chain (C18) fatty acyl-CoA substrates (By similarity) (PubMed:16934754, PubMed:19170545). Can also hydrolyze 3-hydroxyphenylacetyl-CoA and 3,4-dihydroxyphenylacetyl-CoA (in vitro) (By similarity) (PubMed:16934754, PubMed:19170545). May play a role in controlling adaptive thermogenesis (By similarity).