We show that the optimal monetary policy and exchange rate framework depend critically on the economy’s commodity exposure. We develop a flexible but tractable model economy with commodity exports and imports, in which international financial conditions may vary with the commodity cycle. Stabilizing domestic prices is optimal for commodity exporters, in line with standard open-economy policy prescriptions. But for economies that use commodities as inputs in production, optimal policy largely ‘looks through’ the direct and indirect effects of commodity shocks on domestic prices; this contrasts with some earlier findings and policy practice (which only ‘looks through’ the direct effect). Exchange-rate pegs perform better for commodity importers because they stabilize wages and employment, though it is not a robustly optimal policy. In emerging and developing economies, where financial conditions are more tied to the commodity cycle, trade-offs are starker and implementing the optimal policy may be challenging, since it requires enough credibility to keep inflation expectations anchored amidst greater volatility in some nominal variables.