The agency relationship of corporate insiders and bondholders is modeled as a dynamic game with asymmetric information. The incentive effect of risky debt on the investment policy of a levered firm is studied in this context. In a sequential equilibrium of the model, a concept of reputation arises endogenously resulting in a partial resolution of the classic agency problem of underinvestment. The incentive of the firm to underinvest is curtailed by anticipation of favorable rating of its bonds by the market. This anticipated pricing of debt is consistent with rational expectations pricing by a competitive bond market and is realized in equilibrium. Some empirical implications of the model for bond rating, debt covenants, and bond price response to investment announcements are explored.