Add memory functionality similar to Claude code
What feature would you like to see?
Hope there is a maintainable global memory file for easy reuse
Are you interested in implementing this feature?
No response
Additional information
No response
Global memory would be great. Here is a proposal:
EDIT: ~/.codex/AGENTS.md is actually already working!
Previous proposal
Proposal: Implementing AGENTS.md as Global Memory in ~/.codex/
To address the need for persistent, maintainable memory in Codex CLI (similar to Claude code), I propose introducing a global AGENTS.md file located in the user's home directory under ~/.codex/. This file would serve as a centralized, human-editable memory resource, allowing agents and tools to reference, update, and reuse context across projects.
Key Points
-
File Location:
~/.codex/AGENTS.md
This location ensures user-level persistence and avoids polluting individual repositories. -
Usage:
- On agent initialization, Codex loads and parses
AGENTS.mdto build its working memory. - Agents can optionally append information during sessions using
/memoryslash command. - Users can manually edit the file.
- On agent initialization, Codex loads and parses
Benefits
- Consistency: Maintains agent context across projects.
Example AGENTS.md Structure
# Agent Global Memory
## Preferences
- Language: English
- Code style: Functional
## Custom Instructions
- Always suggest performance optimizations.
You've perfectly articulated what I wanted to say👍
In the documentation ~/.codex/AGENTS.md is mentioned. But my experiments show that it does not seem to work.
AGENTS.md is the correct answer
https://agents.md/
I disagree with my commentors before. What we need for codex is something like cline memory bank read here https://docs.cline.bot/prompting/cline-memory-bank this should be automatically setup and the folder should be configurable in settings.