Classical economists assumed that wages and prices in an economy will be very flexible. This is one of the major pieces of the foundation of their whole model of a self-correcting economy. Because wages and prices are flexible, they say, the long-run aggregate supply curve will be vertical.
According to classical economics, prices and wages can and will change rapidly in reaction to any change in aggregate demand. Let us imagine that aggregate demand suddenly jumps. This creates an inflationary gap. In such a case, firms will need to hire more workers. They will lose productivity (because of the law of diminishing marginal returns). Prices will rise to make up for this loss of productivity. Wages will also rise as firms have to bid more for scarce workers. The average price level will rise and aggregate demand will drop back to the previous equilibrium level.
The opposite happens if there is a drop in aggregate demand and the economy goes into a recession. In such a case, workers will take pay cuts to stay in their jobs. Firms will have to lower prices to get people to keep buying their products. The price level will drop and aggregate demand will rise back to the previous equilibrium level.
Thus, classical economists depend on the idea that wages and prices will be very flexible.