The standard Principal–Agent (PA) model assumes that the principal can control the agent’s consumption profile. In an intertemporal setting, however, Rogerson (1985, Econometrica53, 69–76) shows that given the optimal PA contract, the agent has an unmet precautionary demand for savings. Thus the standard PA model is invalid if the agent has access to credit markets. In this paper we generalize the standard PA model to allow for saving and borrowing by the agent. We show that the impact of such access critically depends upon the treatment of default. If default is not permitted, efficiency is strictly reduced by the introduction of credit markets, and the equilibrium level of borrowing or saving is indeterminate in the model. If default is allowed, however, the optimal contract depends upon the level of bankruptcy protection in the economy, which is described by a minimum level of wage income. We show that there is an optimal intermediate range of bankruptcy protection. Within this range, allowing default increases efficiency in the economy relative to the case of no default. Also, the model predicts specific levels of consumer debt, interest rates, and default rates as functions of the level of bankruptcy protection level. Journal of Economic Literature Classification Numbers: D80, G21, G28, J30.