Crohn disease (CD) and ulcerative colitis (UC) are increasingly common, chronic forms of inflammatory bowel disease. The behavior of these diseases varies unpredictably among patients. Identification of reliable prognostic biomarkers would enable treatment to be personalized so that patients destined to experience aggressive disease could receive appropriately potent therapies from diagnosis, while those who will experience more indolent disease are not exposed to the risks and side effects of unnecessary immunosuppression. Using transcriptional profiling of circulating T cells isolated from patients with CD and UC, we identified analogous CD8+ T cell transcriptional signatures that divided patients into 2 otherwise indistinguishable subgroups. In both UC and CD, patients in these subgroups subsequently experienced very different disease courses. A substantially higher incidence of frequently relapsing disease was experienced by those patients in the subgroup defined by elevated expression of genes involved in antigen-dependent T cell responses, including signaling initiated by both IL-7 and TCR ligation - pathways previously associated with prognosis in unrelated autoimmune diseases. No equivalent correlation was observed with CD4+ T cell gene expression. This suggests that the course of otherwise distinct autoimmune and inflammatory conditions may be influenced by common pathways and identifies what we believe to be the first biomarker that can predict prognosis in both UC and CD from diagnosis, a major step toward personalized therapy.