Featured image of post CODEX-R — A Micro Skill That Imports Claude Code Sessions Into Codex CLI

CODEX-R — A Micro Skill That Imports Claude Code Sessions Into Codex CLI

A look at codex-r a Markdown only skill that ports the claude -r workflow into Codex CLI and what it signals about agent session portability

Overview

thedalbee/codex-r is a three-star, MIT-licensed micro tool created on 2026-05-01. In one line: it is a Markdown-only skill that ports the claude -r workflow into OpenAI Codex CLI, so a single codex -r command opens a picker over your Claude Code sessions and imports the one you choose. There is almost no code — the artifact is a single SKILL.md following the agent-skills pattern. The interesting question is not the star count; it is why someone built this and what it signals.

Update (around 2026-05-04): in the same week, Codex landed inside ChatGPT and the Codex Python SDK showed up in the monorepo. The analysis below still holds, but the “Codex Surface Expansion” section near the end reframes what these shifts mean for a bridge like this.

The Problem

Codex CLI 0.128.0 added external agent session import, but the trigger is awkward.

  • The TUI prompt only appears when the external_migration feature flag is on and the session enters the trust onboarding flow.
  • In projects that are already trusted, you may never see the prompt.
  • A large ~/.claude/projects folder makes home-wide detection slow.
  • Existing shell aliases route codex -r straight to the real Codex binary, which exits with unexpected argument '-r'.

The feature exists, but the path to use it is a scavenger hunt. CODEX-R turns the hunt into a single picker behind a thin wrapper.

What CODEX-R Does

The whole skill is one SKILL.md. Invoking $codex-r from a Codex session teaches Codex three things:

  1. How to set up a codex thin wrapper
  2. The Claude Code session picker behavior
  3. The safety verification commands
codex -r                    # open picker, import on selection
codex -r daybreak           # show only ~/ws/daybreak sessions
codex -r --cwd ~/ws/kb      # sessions for a specific directory
codex -r --recursive        # include child directories
codex -r --all daybreak     # text-search all sessions
codex -r --list --limit 5   # list only, no import
codex -r --dry-run --limit 1

Safety Contract

The author is explicit about one rule: setup verification must never import.

  • --list and --dry-run never import, period.
  • An import only happens after the user explicitly selects a session.
  • The default shows only Claude sessions whose recorded cwd exactly matches the current directory.
  • If Codex later ships an official -r, the wrapper steps aside.

CODEX-R does not copy Claude’s settings, MCP servers, plugins, or skills. It only imports session JSONL files through Codex’s own app-server migration API.

How It Works (Codex Internals)

  • Feature flag — external_migration
  • Claude session source — ~/.claude/projects/**/*.jsonl
  • Import RPC — externalAgentConfig/import
  • Completion event — externalAgentConfig/import/completed
  • Import ledger — ~/.codex/external_agent_session_imports.json

A single session is imported as a SESSIONS migration item; the helper reads the threadId from the ledger and runs codex resume <threadId>.

Install

git clone https://github.com/thedalbee/codex-r.git ~/ws/codex-r
ln -sfn ~/ws/codex-r ~/.codex/skills/codex-r
# in a fresh Codex session:
$codex-r

No installer script. One symlink and a skill invocation, and you are done.

Why This Matters

  • A clean example of users wrapping an official feature in an ergonomic shell. The 0.128.0 import RPC was already there; the surface was missing; a user wrote a 30-line thin wrapper to expose it.
  • The Markdown-only-skill shape is the real story. It is a signal that Codex has adopted the Anthropic agent-skills pattern, and that compatibility lets a single person ship a working tool in a day.
  • Three stars is small, but the pattern is big — agent session portability is becoming load-bearing. The same week that surfaced this also brought agentmemory, another user-led standardization attempt for agent memory.
  • The agent infrastructure layer is standardizing fast, and users are gluing it together before model vendors do.

Codex Surface Expansion

When this post was first written, Codex effectively meant the CLI. A few days later that picture has widened. OpenAI pulled Codex inside ChatGPT itself — Codex usage is now bundled with ChatGPT Plus, Pro, Business, Enterprise, and Edu plans, and temporarily extended to Free and Go. The entry points fan out into four surfaces — Codex app, Codex CLI, Codex IDE extension, and Codex web at chatgpt.com/codex — all sharing one ChatGPT login. Almost at the same moment, a Codex Python SDK landed at sdk/python in the openai/codex monorepo: an experimental Pydantic SDK wrapping app-server JSON-RPC v2 over stdio, where with Codex() as codex: codex.thread_start(model="gpt-5") is enough to manage a thread’s lifecycle. The packaging splits into openai-codex-app-server-sdk plus a platform-wheel runtime openai-codex-cli-bin, with the SDK version pinned to the underlying Codex runtime version.

These two shifts cut both ways for a bridge like codex-r. On one side, there is more surface to bridge from — Codex threads can be opened from CLI, IDE extension, web UI, or any Python process, and once app-server RPCs like externalAgentConfig/import become first-class SDK calls, the picker can be rewritten as a Python script. On the other side, the bridge’s location is wobbling — inside ChatGPT, Codex now ships with Memories, Automations, an in-app browser, and Computer Use, which together feel closer to “Claude Code, but inside ChatGPT” than a CLI session importer. The open question is whether a thin wrapper that imports CLI sessions is still the right primitive, or whether spawning and resuming threads directly at the SDK level is the more natural shape — codex-r’s single SKILL.md is a useful tell for where that next round absorbs.

Insights

The meaning of this tool is not in the 30 lines of wrapper; it is in the fact that the wrapper exists at all. Within days of Codex shipping its import RPC, a user had built a picker on top of it and packaged the recipe as a SKILL.md. That timing tells you the agent tool market is no longer locked to a single vendor: Claude Code session JSONL is effectively a portable format, and Codex now exposes a stable RPC to import it. The same pattern is playing out for memory, skills, and MCP servers — and agent-skills as a standard means a single person can ship a compatibility layer in a day. Micro tools like this do not need to grow stars to be valuable; if the model vendor ships an official command, the wrapper steps aside, and that is fine. The real asset here is the pattern, not the tool. When users define ergonomics before the official feature does, the official feature ends up following them.

References

Repo

Related tools

Codex Surface Expansion (around 2026-05-04)

Background

Built with Hugo
Theme Stack designed by Jimmy