The mechanistic basis of sensory adaptation and gradient sensing in bacterial chemotaxis is reversible covalent modification of transmembrane chemoreceptors, methylation, and demethylation at specific glutamyl residues in their cytoplasmic domains.