They showed that O-GlcNAcylation was activated in an xbp1-dependent manner in the ischaemic penumbra after stroke, and this activation was impaired in the aged brain. Here, XBP1 is linked to stroke disorder.