long-horizon reasoning LLM memory