mRNA capping enzymes are directed to nascent RNA polymerase II (Pol2) transcripts via interactions with the carboxy-terminal domains (CTDs) of Pol2 and transcription elongation factor Spt5. Fission yeast RNA triphosphatase binds to the Spt5 CTD, comprising a tandem repeat of nonapeptide motif TPAWNSGSK. Here we report the crystal structure of a Pct1·Spt5-CTD complex, which revealed two CTD docking sites on the Pct1 homodimer that engage TPAWN segments of the motif. Each Spt5 CTD interface, composed of elements from both subunits of the homodimer, is dominated by van der Waals contacts from Pct1 to the tryptophan of the CTD. The bound CTD adopts a distinctive conformation in which the peptide backbone makes a tight U-turn so that the proline stacks over the tryptophan. We show that Pct1 binding to Spt5 CTD is antagonized by threonine phosphorylation. Our results fortify an emerging concept of an "Spt5 CTD code" in which (i) the Spt5 CTD is structurally plastic and can adopt different conformations that are templated by particular cellular Spt5 CTD receptor proteins; and (ii) threonine phosphorylation of the Spt5 CTD repeat inscribes a binary on-off switch that is read by diverse CTD receptors, each in its own distinctive manner. 