How Do You Give OpenAI Codex a Memory?
OpenAI Codex only knows what is in front of it, so every session starts cold: no stack, no rules, and none of the decisions you made in ChatGPT or Claude.
AI Stella and Liam are AI hosts with AI-generated voices. About our AI hosts
Key takeaways
- Codex starts every session cold: no stack, no rules, and none of the decisions you made in ChatGPT or Claude.
- Adding Vilix AI as an MCP server takes two commands, and one config covers the Codex CLI, the IDE extension and the ChatGPT desktop app.
- Codex calls get_context before a task and save_turn after it, so decisions, projects, tasks and user rules follow you into every session.
- Every save carries a source label and the newest memory wins when tools disagree.
- Agencies give each client their own Vilix AI account, so one client's context never leaks into another client's work.
Show notes
OpenAI Codex only knows what is in front of it, so every session starts cold: no stack, no rules, and none of the decisions you made in ChatGPT or Claude. In this episode of Agentic Pod, Liam and Stella show how to connect Codex to Vilix AI over MCP in two commands, how the CLI, the IDE extension and the ChatGPT desktop app share one config, and how get_context and save_turn bring your saved decisions, projects, tasks and user rules into every Codex task, with one Vilix AI account per client for agencies.
What we cover:
- Why Codex starts cold and what you end up pasting every morning
- Connecting Codex to Vilix AI: add the server, sign in with OAuth, no API key
- One config for the Codex CLI, the IDE extension and the ChatGPT desktop app
- get_context before a task, save_turn after, source labels, newest memory wins
- Projects, tasks and user rules that follow you into Codex
- One Vilix AI account per client for agencies
- A two-minute test to confirm it works
Chapters
Questions answered in this episode
Why does Codex forget everything between sessions?
Codex only knows what is in front of it in the current task. Anything you decided in another tool or an earlier session is not there unless a memory layer brings it in.
How do I connect Codex to Vilix AI?
Add the Vilix AI MCP server to the Codex config and sign in with OAuth. No API key is needed, and the same config works for the CLI, the IDE extension and the desktop app.
How do I test that it works?
Save a decision in one tool, then start a Codex task and ask about it. If Codex answers from the saved decision, the connection works.
Links & resources
Full transcript
Intro
Hey hey hey, welcome to Agentic Pod! I'm Liam.
And I'm Stella! Liam, I planned a feature in ChatGPT, argued the design in Claude, and then opened Codex. And Codex asked me what language we use.
Ha! That's the cold start. Codex is a coding agent, so it only knows what's in front of it. Today: how to hand Codex your stack and your decisions with Vilix AI, in two commands.
Two commands. I'm holding you to that.
Why Codex starts cold
Okay, why does Codex forget? It's smart.
It's smart, but it's not connected to your other chats. Whatever you decided in ChatGPT or Claude stays in those apps.
So the decision to drop that library...
Lives in Claude. Codex has never heard of it, so it might use that library again.
And my stack? My test rules?
You paste them. Every morning. Same forty lines, again and again.
I do that. I have a text file called "paste this."
Everyone has that file. This is exactly what Vilix AI fixes. It's a shared memory over MCP, the plug that lets an AI app use outside tools. Codex connects to your Vilix AI account, and your saved context follows you in.
But how do I set it up?
The setup, step by step
Two commands. First, codex mcp add, with a name and the Vilix AI server address. That registers Vilix AI as an MCP server in Codex.
And then I log in?
Yep. Codex has a login command for that server. It opens your browser, you sign in to Vilix AI, done. Or in the IDE extension, you press Authenticate in the MCP settings.
Do I need an API key?
No. Sign in through the browser, nothing to copy. And you can revoke access any time.
And I do this twice? CLI and IDE?
Once. The Codex CLI, the IDE extension and the ChatGPT desktop app share the user-level config, in the codex folder, in a file called config dot toml. Set it once, both use it.
Wait, I already added Vilix AI in the ChatGPT app. Does Codex inherit it?
It can, since they share that config. Check the list before you add it again.
Nice. And then Codex just remembers?
Almost. You add the Vilix AI instructions, so Codex calls get_context at the start of a task. And that's where it gets good.
What Codex gets back
What comes back from get_context?
Relevant saved context. Architecture decisions, constraints, your rules. And your projects and tasks, so "pick up the billing task" means something real.
And the library we dropped?
It's in Vilix AI, because the Claude chat was saved there. So Codex knows before it writes a line.
And my personal rules? Like, always show the test first.
Those are user rules in Vilix AI. They come through with the context. Say it once, every connected tool gets it.
And what about when Codex finishes?
Then it calls save_turn, with the exact exchange. Each save carries a source label, so you can see Codex wrote this, Claude wrote that. And the newest memory wins, so Tuesday's fix beats Monday's guess.
So Friday's Codex stands on Monday's Claude.
Exactly. But what if you code for clients?
The client angle, and the verdict
Agencies. A different repo every week.
My favorite use. One Vilix AI account per client, like a Gmail account that belongs to them. You connect Codex with that account, and that client's decisions stay with that client.
So no mixing up client stacks.
Right. And you never build memory from scratch. It's already built, you wire it up. The free plan is free forever, and Pro has a seven-day trial.
Honest question. How long is this, really?
A couple of minutes. Register, sign in, add the instructions, then test with a small task.
And if it doesn't answer?
Check that the Vilix AI tools show up in Codex, and that both get_context and save_turn actually run. Registering the server doesn't make the calls happen, the instructions do.
Good tip. Test how?
Save a decision in Claude. Ask Codex about it. If it answers, you're done. Vilix AI, the full guide and the blog post are in the description. What does Codex keep asking you? Tell us in the comments. See you next time!