What Codex has built in belongs to the repository or to this machine. A memory layer belongs to you.
AGENTS.md and local memories are genuinely useful and they are the right first step. They are also bounded by design: AGENTS.md holds only what someone wrote down, and local memories stay in one tool on one computer, in a store OpenAI calls generated state. A memory layer keeps what is learned from the work itself outside any one tool, so the decision you made in Codex this morning is there when you open Claude Code on your laptop this evening.
The two are not either-or. A memory layer runs beside AGENTS.md and local memories; the trade-off worth naming is that a layer which spans tools also moves your data between them, so choose one whose controls and privacy practices you trust.