We introduce uncertainty into Holmstrom and Milgrom (1987) to study optimal long-term contracting with learning. In a dynamic relationship, the agent.s shirking not only reduces current performance, but also increases the agent.s information rent due to the persistent belief manipulation e¤ect. We characterize the optimal contract using the dynamic programming technique in which information rent is the unique state variable. In the optimal contract, the optimal e¤ort is front-loaded and stochastically decreases over time. Furthermore, the optimal contract exhibits an option-like feature in that incentives increase after good performance. Implications about managerial incentives and asset management compensations are discussed.