Bacteria that cause disease rely on their ability to counteract and overcome host defenses. Here, we present a genome-scale study of Mycobacterium tuberculosis (Mtb) that uncovers the bacterial determinants of surviving host immunity, sets of genes we term "counteractomes." Through this analysis, we found that CD4 T cells attempt to contain Mtb growth by starving it of tryptophan--a mechanism that successfully limits infections by Chlamydia and Leishmania, natural tryptophan auxotrophs. Mtb, however, can synthesize tryptophan under stress conditions, and thus, starvation fails as an Mtb-killing mechanism. We then identify a small-molecule inhibitor of Mtb tryptophan synthesis, which converts Mtb into a tryptophan auxotroph and restores the efficacy of a failed host defense. Together, our findings demonstrate that the Mtb immune counteractomes serve as probes of host immunity, uncovering immune-mediated stresses that can be leveraged for therapeutic discovery.