some foods can be made outside of the methods of traditional agriculture.
In ww2, the nazis were making butter out of coal. You chemically alter coal to turn it into edible butter.
In theory, we could take the energy from power plants and use it to grow algae and eat that. Spirulina and Chlorella are complete proteins.
Humans don’t ‘need’ carbs to survive. We can pretty much survive on just fat and protein (people live for years on low carb diets). But we could use chemical processing to convert the cellulose of trees into edible glucose.
We could also synthesize glucose out of CO2 produced from coal plants.
It would all be expensive and time/labor intensive, but it would keep people alive. This assumes the infrastructure necessary to do all this is still available though.