Short Answer
What the Web App’s Memory Is
ChatGPT’s web app has two kinds of memory:- Saved memories: facts and preferences you asked it to remember, such as your job or writing style
- Chat history reference: information it picks up from your past conversations
Agent Tool Memory Is Just Files
In coding agent tools, memory always means the client reading and writing local files:Claude Code
CLAUDE.md; personal preferences and lessons learned go into a local memory directory. Both are read when a session starts.Codex
AGENTS.md. Since April 2026, Codex also has built-in memory that extracts content from past sessions and stores it locally in ~/.codex/memories/.Claude API memory tool
- Memory is files, usually Markdown that you can open and edit directly.
- The model does not read every file at once. The client retrieves only what is relevant to the current task.
- Every new conversation reads them again. The model itself remembers nothing; whatever the client reads is sent to the API along with your question.
Taking Memory to Another Computer
Project-level memory travels with the repository
CLAUDE.md and AGENTS.md live in the project directory. Commit them to git and they are available as soon as you pull the code on another computer. Your team can share the same project rules this way.User-level memory must be copied or synced
~/.codex/memories/ or Claude Code’s local memory directory) is not in the repository. Copy it to the same location on the new computer, or keep it in sync with cloud storage or a sync tool.Confirm it works on the new computer
Memory and Cost
Memory is not free:- Memory that gets read is billed as input tokens. Every memory file the client reads in a new conversation counts toward that request’s input.
- A conversation gets more expensive as it grows. Because the API is stateless, each turn resends the entire conversation so far, so input tokens keep adding up.
- Cache billing cuts the cost of the repeated part. If the beginning of each request (system prompt, memory files, earlier turns) stays the same, it can hit the cache and is billed far below the normal input price.
Server-Side Conversation State Is Not Memory
previous_response_id in the OpenAI Responses API: the provider stores the conversation (30 days by default), and the next turn only needs the previous response ID.It differs from memory in two ways:- It only continues one conversation chain. It does not remember your preferences across sessions.
- It doesn’t save money. All earlier content in the chain is still billed as input tokens on every turn.
FAQ
Does APIYI store my conversations?
Does APIYI store my conversations?
previous_response_id above), the provider stores that conversation under its own rules.Can I make the API remember my preferences?
Can I make the API remember my preferences?
Is more memory always better?
Is more memory always better?
Besides copying a folder, how else can I sync memory?
Besides copying a folder, how else can I sync memory?
- Commit project-level memory to git so it travels with the code.
- Keep user-level memory in sync with cloud storage or a sync tool.
- Run your own memory service: some agent tools can connect to an external memory service over MCP, and multiple computers can share the same service.