We study optimal incentive provision for “knowledge workers”, a crucial resource for many organizations. We augment a standard moral-hazard framework to reflect two key patterns: First, retention is a challenge because workers are free to leave; thereby harming their employer. Second, the value of the worker׳s outside option might depend on effort on the job. Optimal contracts that retain workers exhibit properties such as first-best effort and surplus, or non-responsiveness to changes in underlying conditions. Due to large rents, full retention is, however, costly for employers. Hence, even when socially inefficient, separation might occur in equilibrium.