Carbonate sediments in non-vegetated habitats on the north-east Adriatic shelf are dominated by shells of molluscs. However, the rate of carbonate molluscan production prior to the 20th century eutrophication and overfishing on this and other shelves remains unknown because: (i) monitoring of ecosystems prior to the 20th century was scarce; and (ii) ecosystem history inferred from cores is masked by condensation and mixing. Here, based on geochronological dating of four bivalve species, carbonate production during the Holocene is assessed in the Gulf of Trieste, where algal and seagrass habitats underwent a major decline during the 20th century. Assemblages of sand-dwelling Gouldia minima and opportunistic Corbula gibba are time-averaged to >1000 years and Corbula gibba shells are older by >2000 years than shells of co-occurring Gouldia minima. This age difference is driven by temporally disjunct production of two species coupled with decimetre-scale mixing. Stratigraphic unmixing shows that Corbula gibba declined in abundance during the highstand phase and increased again during the 20th century. In contrast, one of the major contributors to carbonate sands - Gouldia minima - increased in abundance during the highstand phase, but declined to almost zero abundance over the past two centuries. Gouldia minima and herbivorous gastropods associated with macroalgae or seagrasses are abundant in the top-core increments but are rarely alive. Although Gouldia minima is not limited to vegetated habitats, it is abundant in such habitats elsewhere in the Mediterranean Sea. This live-dead mismatch reflects the difference between highstand baseline communities (with soft-bottom vegetated zones and hard-bottom Arca beds) and present-day oligophotic communities with organic-loving species. Therefore, the decline in light penetration and the loss of vegetated habitats with high molluscan production traces back to the 19th century. More than 50% of the shells on the sea floor in the Gulf of Trieste reflect inactive production that was sourced by heterozoan carbonate factory in algal or seagrass habitats.