Quickly adapting our behavior depends on mechanisms that open and close a metaphorical ‘gate’ to let only relevant information into working memory. Using direct brain recordings in neurosurgical patients, we discovered neocortical brain networks that rapidly come in and out of sync to direct this gate – a role previously attributed to a subcortical region called the striatum. Findings reveal a neocortical gating mechanism and demonstrate how human behavior can emerge from interactions across brain networks. Paper published in Nature Communications.