The rise of offshoring of intermediate inputs raises important questions for commercial policy. Do the distinguishing features of offshoring introduce novel reasons for trade policy intervention? Does offshoring create new problems of global policy cooperation whose solutions require international agreements with novel features? Can trade agreements that are designed to address problems that arise when trade predominantly takes the form of the exchange of final goods be expected to perform in a world where offshoring is prevalent? In this paper we provide answers to these questions, and thereby initiate the study of trade agreements in the presence of offshoring. We do so by deriving the Nash and internationally efficient trade policy choices of governments in an environment in which some trade flows involve the exchange of customized inputs, contracts governing these transactions are incomplete, and the matching between final-good producers and input suppliers may involve search frictions. By characterizing the differences between Nash and internationally efficient policies in this environment, and by comparing these differences to those that would arise in the absence of offshoring of customized inputs, we seek to understand the implications of offshoring for the role of trade agreements. Our findings indicate that the rise of offshoring is likely to complicate the task of trade agreements, because in the presence of offshoring, (i) the mechanism by which countries can shift the costs of intervention on to their trading partners is more complicated and extends to a wider set of policies than is the case when offshoring is not present, and (ii) because the underlying problem that a trade agreement must address in the presence of offshoring varies with the political preferences of member governments. As a consequence, the increasing prevalence of offshoring is likely to make it increasingly difficult for governments to rely on simple and general rules -- such as reciprocity and non-discrimination -- to help them solve their trade-related problems.