Why AI coding agents forget between sessions, the five memory layers that fix it (rules files, auto memory, handoffs, MCP, decisions), and how to choose.