Novel experiences dampen previous memory representations in the hippocampus and prefrontal cortex, facilitating flexible strategy encoding in mice.