The insect immune system serves as a key defense against attack by parasitoids. Incompatible hosts often eliminate parasitoids by encapsulation, a process in which hemocytes form a multilayered envelope around the invading organism. Capsule formation involves cooperation between one or more classes of hemocytes and is likely mediated by cytokines and adhesion molecules. Reciprocally, parasitoids have evolved a variety of strategies for overcoming host immune responses. Some parasitoids passively avoid elimination by developing in locations inaccessible to host hemocytes or by possessing surface features that fail to elicit an immune response. Other species actively disrupt the host immune system by injecting specific factors into the host at oviposition. In particular, polydnaviruses associated with several taxa of parasitoids disrupt capsule formation by killing hemocytes or altering their ability to adhere to foreign surfaces. These symbionts have likely played a critical role in evolution of host range and in defining parasitoid-host compatibility.