Back to all articles
TutorialDecember 3, 2026·10 min read

Codex App vs CLI - What They Share and What Stays Separate (2026)

You set up an MCP server in the Codex CLI last week. Today you open Codex in the ChatGPT desktop app on the same laptop and wonder: is that server already there, or do you set it up again? What about your AGENTS.md, your memories, the plugins you installed, the chat you were in the middle of?

OpenAI's documentation answers most of this, but the answers are spread across several pages. The short answer: the desktop app and the CLI on the same machine share one Codex home, ~/.codex by default. OpenAI's MCP page says: "The ChatGPT desktop app, Codex CLI, and IDE extension share this configuration." Both read the same AGENTS.md files and the same local memory store. What differs is mostly the controls: settings screens in the app versus commands and flags in the CLI, plus a few options that apply only to the app.

This guide covers what the Codex app is today, what the two share, what stays separate, how to move a session from one to the other, and how to keep your project context consistent across both.

What the Codex app is now

The Codex app is Codex inside the ChatGPT desktop app. OpenAI's getting started steps describe it: open the desktop app, then choose ChatGPT or Codex, and in Codex start with New chat. The app runs on macOS and Windows, with a Linux installation guide.

The CLI is the terminal interface. You start it with codex and work in a text interface, with slash commands and flags.

A third surface, the IDE extension, shares much of the same setup. This guide focuses on the app and the CLI, and notes where the IDE extension differs.

Codex App vs CLI at a glance

DimensionCodex AppCLI
ConfigurationReads ~/.codex/config.toml; settings screens for common optionsReads ~/.codex/config.toml; -c key=value and flags override per run
MCP serversSettings > MCP servers; shared configurationconfig.toml or codex mcp commands; shared configuration
InstructionsAGENTS.md chain from global and project filesSame AGENTS.md chain
Local memoriesSettings > Personalization > Enable Codex memories; /memories per chat[features] memories = true in config.toml; /memories per chat
PluginsPlugins tab/plugins browser and codex plugin commands
Moving sessionsReceives a CLI session through /app/app opens the current session in the desktop app
App-only optionsdesktop.custom_file_handlers and other Desktop section optionsNot applicable

Checked against each vendor's documentation on December 3, 2026.

What the app and the CLI share

One Codex home

OpenAI's configuration guide says: "Codex stores its local state under CODEX_HOME (defaults to ~/.codex)." The files it lists there include config.toml, auth.json if you use file-based credential storage, history.jsonl if history persistence is on, and logs and caches.

Because both clients run against the same home on the same machine, a change in one is visible to the other, for anything stored there.

Configuration

Your personal defaults live in ~/.codex/config.toml, and projects can add .codex/config.toml files, which Codex loads only for trusted projects. OpenAI's precedence list, highest first:

  1. CLI flags and --config overrides
  2. Project .codex/config.toml files, with the closest taking precedence
  3. A profile selected with --profile
  4. Your user config.toml
  5. Cloud-managed defaults for your workspace
  6. System config
  7. Built-in defaults

The top item matters for the comparison. In the CLI, you can override a setting for one run without changing your saved config. The app uses your saved configuration and its settings screens.

For ready-made setups, see Codex config.toml examples.

MCP servers

This is the clearest shared piece. OpenAI's MCP documentation says the desktop app, CLI, and IDE extension "support MCP servers and share MCP configuration for the same Codex host." It adds that once you configure your servers, "you can switch among those clients without redoing setup."

In the app, you manage them under Settings > MCP servers. In the CLI, you edit config.toml or use the codex mcp commands.

Instructions

Both read the same AGENTS.md chain. Codex reads a global file in your Codex home, then walks from the project root down to the working directory. Since the files live on disk, an edit to AGENTS.md applies to the next session in either client.

Local memories

The memory store is shared too. OpenAI's memories page says local Codex clients use "a separate local memory store and controls", separate from ChatGPT web memory. Memories live under your Codex home, in memories/ or memories_v2/.

How you turn memories on differs. In the app, open Settings > Personalization and turn on Enable Codex memories. In the CLI, add memories = true under [features] in config.toml. In both, /memories controls whether the current chat can use existing memories or contribute to future ones.

Some machine-wide controls

A few settings explicitly cover every local client. For example, OpenAI's configuration guide describes a feedback setting that disables feedback uploads "across the ChatGPT desktop app, Codex CLI, and IDE extension on a machine".

What stays separate

Where you change settings

The app gives you settings screens; the CLI gives you config.toml, flags, and -c overrides. The underlying file is shared, but per-run overrides in the CLI don't change what the app uses.

App-only options

Some configuration applies to one client only. OpenAI's configuration guide has a Desktop section that starts: "Options in this section apply only to the ChatGPT desktop app." One example is desktop.custom_file_handlers, which adds editors to the app's Open in menus.

Plugin browsing

Plugins come from the same catalog, but you reach them differently. In the app, open the Plugins tab. In the CLI, type /plugins or use codex plugin. Some plugins are Desktop only and need the app. The IDE extension doesn't support plugins.

App features with no CLI equivalent

The desktop app includes features that sit outside the terminal, such as projects, file and artifact views, and computer use. OpenAI's app page also lists ChatGPT's Chat and Work modes alongside Codex. Some plugins, like Apple Messages, run in the desktop app and aren't available in the CLI.

Command sets

Slash commands overlap but aren't identical. OpenAI lists app composer commands such as /feedback, /goal, /init, /mcp, /plan, /review, and /status. The CLI has its own full command and flag reference, including codex resume, codex fork, and codex exec.

Move a session between them

You can take a CLI session into the app. OpenAI's CLI reference says: "On macOS and Windows, type /app to open the current session in the ChatGPT desktop app." The expected result is that the app opens the same saved chat so you can continue there.

From your shell, codex app launches the desktop app, or starts the installer if it's missing. On macOS, it can open a specific workspace path.

In the other direction, start the CLI in the same project directory. It reads the same configuration, instructions, and memories. To pick up a saved chat in the terminal, use codex resume, which looks in the current working directory unless you pass --all.

Where the IDE extension fits

If you also use Codex in VS Code or another editor, the extension joins the same setup with a few differences.

Configuration. OpenAI's configuration guide says: "The CLI and IDE extension share the same configuration layers." To open the file from the extension, select the gear icon, then Codex Settings > Open config.toml.

MCP servers. The extension shares MCP configuration with the app and CLI on the same Codex host.

Memories. OpenAI's memories page says the extension "uses the connected Codex host's local memory store." When memories are on for that host, the extension uses the same chat-level controls as the CLI.

Plugins. The extension doesn't support them. Install plugins from the app or the CLI.

So on one machine, all three clients read the same configuration, instructions, MCP servers, and memories. Plugins are the main exception.

What people try first

Setting up MCP servers twice. They're shared on the same Codex host.

Expecting a -c override in the CLI to change the app. Per-run overrides apply to that run only.

Turning on memories in the app and expecting a different store in the CLI. It's the same local store.

Looking for plugins in the IDE extension. Use the app or the CLI.

Using a Desktop section option in the CLI. Those options apply only to the app.

Retyping context when switching. Use /app to carry the session over.

The Fix: One setup for both clients

Step 1: Keep shared settings in config.toml

Put the model, approval policy, sandbox, and MCP servers in ~/.codex/config.toml or a trusted project's .codex/config.toml.

Step 2: Keep instructions in AGENTS.md

Write rules both clients should follow in global or project AGENTS.md files.

Step 3: Decide on memories once

Turn local memories on or off deliberately, and use /memories per chat when you need an exception.

Step 4: Write the project context that isn't config

Decisions, open questions, and the reasons behind your setup don't belong in config.toml. Keep them in a short note.

Setting this up in MemoryLake

The app and the CLI share a Codex home, so on one machine they stay in sync. Your context doesn't extend beyond that home, though: a second computer, a cloud task, or another assistant starts without it. And Codex memories are generated from past chats rather than written by you.

MemoryLake is a memory layer for the project context you write yourself, kept in one place you maintain and available to the assistants you connect, such as Codex, Claude Code, and ChatGPT.

You write the entries yourself. Nothing is read out of, written to, or deleted from your ~/.codex directory, config.toml, AGENTS.md files, local memories, or sessions, or from any vendor's store. The app and the CLI work the way OpenAI describes them.

Step 1: Create an API key

Sign in and generate a key from the dashboard. Keep it somewhere private.

The MemoryLake console showing the API keys screen, where a new key is created and copied for use in an agent
The MemoryLake console showing the API keys screen, where a new key is created and copied for use in an agent

Step 2: Upload your first memories

Start with the note from Step 4 of the fix: decisions, open questions, and the reasons behind your project setup.

The MemoryLake workspace with the first documents uploaded, listing each file as it becomes searchable memory
The MemoryLake workspace with the first documents uploaded, listing each file as it becomes searchable memory

Step 3: Connect your AI & agents

Connect Codex, Claude Code, ChatGPT, and the other assistants you use, so the same context is available on any machine.

The MemoryLake integrations screen listing the AI clients and agent frameworks that can be connected to the memory layer
The MemoryLake integrations screen listing the AI clients and agent frameworks that can be connected to the memory layer

What this changes in practice

The first difference is portability. A new laptop or a cloud task can start from the same written context.

The second is clearer roles. config.toml holds settings, AGENTS.md holds rules, and your notes hold reasoning.

The third is consistency across tools. If you also plan work in another assistant, it reads the same context as Codex.

Best practices for using the Codex app and CLI together

Configure once in config.toml. Both clients read it.

Add MCP servers in one place. The others pick them up.

Use CLI overrides for experiments. They don't change your saved setup.

Trust only the projects you mean to. Project .codex/ layers load only for trusted projects.

Use /app to switch mid-session. It opens the same saved chat in the desktop app.

Check Desktop-only options. They won't affect the CLI.

Review generated memories before sharing your Codex home. OpenAI advises reviewing memory files first.

Conclusion

Codex in the ChatGPT desktop app and the Codex CLI share one Codex home on your machine. They read the same config.toml, the same MCP configuration, the same AGENTS.md chain, and the same local memory store. You can move a CLI session into the app with /app, or launch the app from the terminal with codex app.

What stays separate is how you control them: settings screens and Desktop-only options in the app, flags and per-run overrides in the CLI, and different paths to the same plugin catalog. Keep shared settings in config.toml, rules in AGENTS.md, and the reasoning behind your setup in a note you can carry beyond one machine.

Frequently asked questions

Do the Codex app and CLI share settings?

Yes, through ~/.codex/config.toml on the same machine. CLI flags and -c overrides apply only to that run.

Do I need to set up MCP servers separately in each?

No. OpenAI says the desktop app, CLI, and IDE extension share MCP configuration for the same Codex host.

Do the app and CLI share memories?

Yes. Local Codex memories live under your Codex home, and both clients use that store.

Can I continue a CLI session in the desktop app?

Yes. On macOS and Windows, type /app in the CLI to open the current session in the desktop app.

Are there settings that only work in the app?

Yes. Options in the Desktop section of OpenAI's configuration guide apply only to the ChatGPT desktop app.

Can I use plugins in both?

Yes, through the Plugins tab in the app and /plugins in the CLI. Some plugins are Desktop only, and the IDE extension doesn't support plugins.

Is the Codex app or the CLI better for long tasks?

It depends on how you work. Both use the same configuration and instructions; the app adds visual tools, and the CLI adds per-run overrides and scripting commands.