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 effect....