They weren't first. Low density agricultural settlements are not suburbs, which are by definition an extension of the urban area, populated primarily by people not engaged in the agricultural economy, but rather the industrial economy.
To this day, suburbs are frequently built on top what were previously agricultural settlements, with somewhat similar densities but completely different functions.
Agricultural villages were first, not suburbs.
Maybe these low-density settlements can be some inspiration to how to solve the problem?
The suburban agriculture movement is one option.
It is however hampered by the reality that in in a lot of suburbs, growing food - especially in the front yard - is perceived similarly to hang-drying laundry, which is that it signals poverty, and is often prevented by city councils and HOAs.
This is an outcome of the sociological reasons why suburbs formed in the first place.
Also big cities in Central Asia like Merv had farms intra muros to shelter them from encroaching desert.
This is so different from what we imaginecas a city model...
The cities that arose out of the long history of tropical agriculture weren’t high-density clusters of stone buildings ringed by farms like many ancient cities. Instead, they were low-density sprawl that incorporated large swatches of farmland into the urban fabric. Homes and public dwellings were made from earth and perishable plant materials. Though impressive, these urban features quickly returned to wilderness after people had abandoned them.