Memories Design - Separating Permanent Rules from Local Recall
About 5 minutes
Codex Memories carry stable preferences, recurring workflows, technology choices, and known pitfalls from earlier threads into future work.
Responsibility boundaries
Section titled “Responsibility boundaries”| Information | Owner |
|---|---|
| Mandatory approval rule | AGENTS.md or shared/rules/ |
| Project specification | Versioned project document |
| Stable personal preference | Memories |
| Repeated lesson from recent work | Memory, then promoted after review if broadly useful |
Enablement and Storage
Section titled “Enablement and Storage”Enable Memories in Codex settings or user configuration.
[features]
memories = trueGenerated state is stored under ~/.codex/memories/ by default. Codex can skip short or active sessions and updates memory in the background, so changes may not appear immediately.
Per-Thread Controls
Section titled “Per-Thread Controls”In the Codex app and TUI, /memories controls whether the current thread reads existing memories and whether it can contribute to future memories. Disable generation for sensitive customer data or temporary investigations.
Promote Memory into Rules
Section titled “Promote Memory into Rules”Codex attempts to redact secrets, but inspect generated files before sharing a Codex home directory. Repeated team-wide guidance should move from personal memory into shared/rules/, a Skill, or a specification.
Next, Harness testing and validation detects drift across the complete configuration.
See the references for the external specifications and background sources used on this page.[1][2]
References
Section titled “References”- OpenAI, Codex documentation
- OpenAI, OpenAI API documentation