Goal-Directed Search Outperforms Goal-Agnostic Memory Compression in Long-Context Memory Tasks