We study the optimal length of a delegation contract in an incomplete information model where an agent plays a (possibly) repeated game on behalf of his principal. A short-term contract provides the principal with the flexibility to replace an agent who has proved not to be suitable for his job, while a long-term contract allows the agent to build a reputation for being trustworthy in his relationships with third parties. When contracts are renewable, the relationship between principal and agent may sometimes turn out to be stable even with short-term contracts. In this paper we show that this implies a non-monotonic relation between the importance of reputation and the optimal length of delegation contracts. In particular, in games where reputation is very important, short-term delegation contracts can be optimal. The implications of our analysis are illustrated by means of a few examples: the problem of credibility in the management of monetary policy, vertical relationships within firms, the strategic interactions between lenders and borrowers.