Repository navigation
Description
What feature would you like to see?
Already shared this with @tibo-openai, but I think adaptive, long-term memory in Codex would make the UX better.
Context
I've been really annoyed with correcting Codex multiple times about a certain way to do a very niche thing (like setting a specific timeout to run tests). I also don’t like how Codex often self corrects its approach in its COT but never actually preserves the lessons. AGENTS.md is not good enough for these cases because it requires manual updates - and, typically, developers can’t precisely describe their preferences. It’s also pretty expensive for the developer to context switch and update AGENTS.md every time something interesting happens.
Related Issues
#6532 (explains the same issue described here).
Proof of Concept
I implemented a basic POC of memories in a fork.
I considered memories as simple notes stored in memories.md. After a normal user turn completes, Codex gathers the user’s text plus recent tool outputs from the tail of history, sends that combined text to a small “extract memories” prompt, and expects short bullet memories back. It filters out empty memories, dedupes, and appends the new items. Codex also skips this flow for exec/sub-agent sessions and caps sizes so it doesn’t grow without limits.
Happy to discuss alternatives.
Additional information
I understand the roadmap is predefined but Claude Code is getting long-term memory very soon.
I also should acknowledge other efforts in the past to add memory, like #4655, were closed. Perhaps the timing wasn't right.
Activity
github-actions commentedon Dec 20, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
jgh0sh commentedon Dec 20, 2025
Not duplicates and I’ve already cited one of those issues as related.
alexander-azizi-martin commentedon Dec 20, 2025
I've faced similar issues and think this would be a great addition
styler-ai commentedon Dec 23, 2025
HI Team. I let codex cli create a cline memory skill and from now on always have a project specific cline memory bank in the project folder under .codex/memory/... I more or less copied the cline way of doing it. codex 5.2 xhigh is updating it constantly after each run, works like a charm.
jgh0sh commentedon Dec 23, 2025
@styler-ai I’ve also been playing around with a memory skill. See repo..
I think it’s a temporary solution. Memory should be baked into the structure of the agent.
Can you share the repo for the cline skill? I’d be open to trying it out.
COWI-MI commentedon Jan 22, 2026
As an alternative,
AGENTS.mdcould be used instead of amemories.mdfile.If so, I would prefer that Codex asks the user if it should add a learned preference to the file, so the user stays in control.
jgh0sh commentedon Feb 27, 2026
Claude Code officially supports memory following the spec I defined (a memory markdown file).
I'm sure the team here is hard at work building something similar to support continual learning, but let this comment serve as a nudge.
jgh0sh commentedon Feb 27, 2026
@COWI-MI You are able to edit the memory values in
memories.md. I think it's important to separate explicit instructions (AGENTS.md) from learned instructions (memory).COWI-MI commentedon Feb 27, 2026
related discussion: #12567
jgh0sh commentedon Apr 16, 2026
Codex is rolling out memory.
Probably time to close this 🥲. What do you think @etraut-openai?
etraut-openai commentedon Apr 16, 2026
Yes, it's time to close this. We announced today that memory support is now available in preview. Please give it a try! Open bug reports if you run into issues.