Motivated by recent simulations of galaxy formation in which protogalaxies acquire their baryonic content through cold accretion, we study the gravitational fragmentation of cold streams flowing into a typical first galaxy. We use a one-zone hydrodynamical model to examine the thermal evolution of the gas flowing into a 10 8 M dark matter halo at redshift z = 10. The goal is to gain an understanding of the expected fragmentation mass scale and thus the characteristic mass of the first population of stars to form by shock fragmentation. Our model accurately describes the chemical and thermal evolution of the gas as we are specifically concerned with how the chemical abundances and initial conditions of the low-density, metal-enriched, cold accretion streams that pass an accretion shock alter the cooling properties and tendency to fragment in the post-shock gas. Cold accretion flows are not shock heated at the virial radius but instead flow along high-baryonic-density filaments of the cosmic web and penetrate deep into the host halo of the protogalaxy. In this physical regime, if molecular cooling is absent because of a strong Lyman-Werner background, we find there to be a sharp drop in the fragmentation mass at a metallicity of Z ∼ 10 −4 Z . If, however, H 2 and HD molecules are present, they dominate the cooling at T < 10 4 K, and metallicity then has no effect on the fragmentation properties of the cold stream. For a solar abundance pattern of metallicity, O is the most effective metal coolant throughout the evolution, while for a pair instability supernova (PISN) metallicity yield, Si + is the most effective coolant. PISN abundance patterns also exhibit a slightly smaller critical metallicity. Dust grains are not included in our chemical model, but we argue that their inclusion would not significantly alter the results. We also find that this physical scenario allows for the formation of stellar clusters and large, 10 4 M bound fragments, possibly the precursors to globular clusters and supermassive black holes. Finally, we conclude that the usual assumption of isobaricity for galactic shocks breaks down in gas of a sufficiently high metallicity, suggesting that metal cooling leads to thermal instabilities.