Long-term synaptic plasticity requires a mechanism that converts short Ca2+ pulses into persistent biochemical signaling to support the changes in the structure and function of synapses over long periods of time. Here, we present a novel type of positive feedback loop, formed by a reciprocally activating kinase-effector complex (RAKEC) in dendritic spines, enabling the persistence and confinement of the molecular memory. We found that stimulation of a single spine causes the rapid formation of a RAKEC consisting of a kinase (CaMKII) and its substrate (RacGEF Tiam1), which can stably promote actin-polymerization through Rac1, thereby maintaining the structure of the spine over a long period of time during LTP. This is achieved by a pseudo-autoinhibitory domain found within Tiam1, homologous to the autoinhibitory domain of CaMKII. The RAKEC can store biochemical information in small subcellular compartments, thus potentially serving as a general mechanism for prolonged and compartmentalized signaling.