Memories
Operate Codex memories and persistent facts without accumulating stale context.
Key takeaways
- Memories cut repeated explanation but can preserve stale assumptions, so treat them as operational knowledge with lifecycle rules.
- Classify by risk: personal preferences are low, repository facts medium, and policy rules or temporary context high (and dangerous when stale).
- Store durable facts only, prefer repository docs for shared knowledge, and delete any memory that contradicts current source files.
- Never store secrets, private customer data, or credentials in memory.
- Apply the three-month test: if a fact would not still be correct in three months, put it in the task brief instead of persistent memory.
Memories can reduce repeated explanation, but they can also preserve outdated assumptions. Treat memories as operational knowledge with lifecycle rules.
Memory Types
| Type | Example | Risk |
|---|---|---|
| Personal preference | Preferred response style or editor habit | Low |
| Repository fact | Build command, package manager, folder convention | Medium |
| Policy rule | Approval or security requirement | High |
| Temporary context | Current project plan or migration state | High when stale |
Operating Rules
- Store durable facts, not temporary guesses.
- Prefer repository docs for shared knowledge.
- Review memories after major project or policy changes.
- Delete memories that contradict current source files.
- Do not store secrets, private customer data, or credentials.
Quality Check
Ask whether the memory would still be correct three months from now. If not, put it in the task brief instead of persistent memory.