Pair the memory tool with context editing so learning survives the clear
Claude Platform Docs·medium signal
Tool-result clearing throws away exactly the data an agent might still need, so the documented pattern is to have Claude write durable facts to the memory tool *before* the clear fires — the summary persists to a file while the bulky raw results get evicted. This lets a long-horizon run stay under the trigger threshold without amnesia, and is the intended way to combine the two features rather than choosing one.