Electronic switches based on the migration of high-density point defects, or memristors, are poised to revolutionize post-digital electronics. Despite significant research, key mechanisms for filament formation and oxygen transport remain unresolved, thus hindering our ability to predict and design crucial device properties. For example, predicted retention times based on current models can be 10 orders of magnitude lower than ones experimentally realized. Here, using electrical measurements, chemical spectroscopy, and first-principles calculations on tantalum oxide memristors, we reveal that the formation and stability of conductive filaments crucially depend on the stability of the amorphous oxygen-rich and oxygen-poor compounds, which undergo composition phase separation. Including the previously neglected effects of this amorphous phase separation reconciles unexplained discrepancies and enables predictive design of key performance indicators such as retention stability. This result emphasizes non-ideal thermodynamic interactions as key design criteria in post-digital devices with defect densities substantially exceeding those of today’s covalent semiconductors.