Hypoxia induces d-serine production by Mycobacterium tuberculosis which inhibits mTORC1 and T-bet expression to restrict downstream CD8+ T cell immune responses and macrophage activation, and inhibit control of tuberculosis in mice. Here, CD8A is linked to tuberculosis.