if you don't have cornstarch, all-purpose flour will work as a thickening agent. use twice as much flour as you would cornstarch. potato starch is another good substitute for both thickening and baking, as it delivers similar results to cornstarch and requires an equal amount.