In the presence of a time-inconsistency problem with optimal agency contracts, we show that competitive markets implement allocations that Pareto dominate those achieved by a benevolent planner, they induce strictly more effort, and they sometimes make the commitment problem disappear entirely. In particular, we analyze a model with moral hazard and two-sided lack of commitment. After agents have chosen a hidden effort and the need to provide incentives has vanished, firms can modify their contracts and agents can switch firms. As long as the ex-post market outcome satisfies a weak notion of competitiveness and sufficiently separates individuals who choose different effort levels, the market allocation is Pareto superior to a social planner’s allocation. We construct a specific market game that naturally generates robust equilibria with these properties. In addition, we show that equilibrium contracts without commitment are identical to those with full commitment if the latter involve no cross-subsidization between individuals who choose different effort levels.