Export your ChatGPT memory and give it to every AI agent

Every chat assistant you use builds up a picture of you: your rules, your preferences, your projects. None of them share it. Here is how to export that memory with one prompt, review it, and hand it to Claude Code, Cursor, Codex and every other agent you use.

If you have used ChatGPT for a year, it knows things about you that took a year to teach. You don't like emoji. You want the critical answer, not the encouraging one. You are building a fintech backend and a side project, and it knows which is which.

Then you open Claude Code, or Cursor, or a fresh Grok chat, and you start from zero. Every assistant builds its own picture of you, and none of them share it. The knowledge is real and it is yours, but it lives inside one product.

This post covers how to get it out, check it, and give it to every agent you use.

What "memory" actually is here

Most chat assistants now keep some form of saved memory: short facts about you that they carry between conversations. On top of that, they can often infer more from past chats if you ask. Both are useful. Both are also unverified. An assistant can misremember, overgeneralize, or record something you said once as a rule you live by.

That second point matters more than it sounds. A memory that says "always push straight to main" is an instruction. If it moves from one assistant into every agent you run, it starts steering real work. So an export is not enough. You need an export you can review.

The shape of a good export

The prompt below is what ctxfile hands you. It asks for the same things a careful person would:

Get it with one command:

npm install -g ctxfile
ctxfile memory prompt

Add --scope project for a project export, or --paste when the assistant has no connection to ctxfile.

Two ways in

Connected assistants call the tool directly. Claude Code, Cursor and other local MCP clients talk to ctxfile already. ChatGPT, Grok and claude.ai can reach it through the relay of an encrypted ctxfile vault. Paste the prompt, and the assistant calls ingest_memory with the export. If it gets a field wrong, the tool answers with the exact path and problem (entries.3.date: must be a calendar date) and the assistant fixes it and calls again.

Everything else pastes. With --paste, the prompt asks for one JSON code block. Copy the whole reply, prose and all, and pipe it in:

pbpaste | ctxfile memory import

The importer finds the JSON block inside the reply on its own.

ingest_memory · scope “global”
What each assistant knows
ChatGPT3 entries

instruction · “Never add attribution lines to commits”

preference · concise, critical feedback

career · runs a fintech backend team

Grok2 entries

preference · Concise, critical feedback.

project · ctxfile: local-first MCP server, v0.6

Your memory
Waiting for your approval

instruction Never add attribution lines to commits

verbatim · origin stored · no agent sees it until you approve
Active

Concise, critical feedback
preference · chatgpt, grok

Runs a fintech backend team
career · chatgpt

ctxfile: local-first MCP server, v0.6
project · grok

In get_context for
Claude CodeCursorCodexclaude.ai
Two assistants, one memory. The same preference from both merges into one entry with both sources; the instruction waits for you; everything else reaches every agent on its next get_context.

Review before anything steers

Here is what happens to an import:

  1. Everything is validated and redacted. Unknown fields are rejected. Secrets pass the same redaction as files and session digests.
  2. Duplicates merge. The same preference from ChatGPT and Grok becomes one entry that lists both as sources. Case, spacing and a trailing full stop don't create a second copy.
  3. Instructions and identity wait. They land as pending. No agent sees them until you approve them.
  4. Rejections stick. Reject an entry and it becomes a tombstone. If any assistant reports the same fact later, the import skips it and says so.

Review from the terminal or the dashboard's Memory view:

ctxfile memory list --pending
ctxfile memory approve 4
ctxfile memory reject 7

Global and project memory

Not everything an assistant knows belongs everywhere. ctxfile keeps two scopes.

Global is you: how you like to work, your background, your projects. Every project on your machine sees it. Project is one repository: its conventions, decisions already made, traps already found. Only that project sees it.

Personal categories are global-only on purpose. A project scope can be shared with a team through a hub, and your career history has no business in a shared repo's context. When the two scopes disagree, agents are told the project entry wins.

What your agents receive

Once entries are active, every get_context call carries a memory block: your approved instructions first, then preferences, down to biography last, capped at 4,000 tokens with project entries filled first. It is attached when the call happens rather than cached, so an approval shows up on the very next call. Claude Code, Cursor, Codex, Gemini CLI and any other MCP client get the same block.

Sessions feed it too. When you tell an agent "always run the linter before committing", it can save that sentence in user_directives with the session, and ctxfile stages it as a pending project instruction.

Take it back out

Memory import is not a one-way door. ctxfile memory export prints what is approved and active as category headers with dated lines, oldest first:

### Instructions

[2026-01-05] - Never add attribution lines to commits
[unknown] - Be critical of my ideas

Paste that into another assistant's memory settings, a CLAUDE.md, or an AGENTS.md.

The honest limits

The export is only as good as what the assistant can recall and is willing to write down. "This is the complete set" is the assistant's claim, and nothing can verify it. The review step exists because the content is agent-reported. Treat the first import as a draft of yourself, and prune it.

What you get in return is a single place where that draft lives, under your control, readable by every agent you use.

Try it

npm install -g ctxfile
ctxfile memory prompt

Memory import is part of the free, open-source core. The memory docs cover the schema, the scopes, and sync. The live demo shows the dashboard over a sample project before you install anything.