<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Codex Sdk on ICE-ICE-BEAR-BLOG</title><link>https://ice-ice-bear.github.io/tags/codex-sdk/</link><description>Recent content in Codex Sdk on ICE-ICE-BEAR-BLOG</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 07 May 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://ice-ice-bear.github.io/tags/codex-sdk/index.xml" rel="self" type="application/rss+xml"/><item><title>CODEX-R — A Micro Skill That Imports Claude Code Sessions Into Codex CLI</title><link>https://ice-ice-bear.github.io/posts/2026-05-07-codex-r-claude-code-bridge/</link><pubDate>Thu, 07 May 2026 00:00:00 +0900</pubDate><guid>https://ice-ice-bear.github.io/posts/2026-05-07-codex-r-claude-code-bridge/</guid><description>&lt;img src="https://ice-ice-bear.github.io/" alt="Featured image of post CODEX-R — A Micro Skill That Imports Claude Code Sessions Into Codex CLI" /&gt;&lt;h2 id="overview"&gt;Overview
&lt;/h2&gt;&lt;p&gt;&lt;a class="link" href="https://github.com/thedalbee/codex-r" target="_blank" rel="noopener"
 &gt;&lt;code&gt;thedalbee/codex-r&lt;/code&gt;&lt;/a&gt; is a three-star, MIT-licensed micro tool created on 2026-05-01. In one line: it is a &lt;strong&gt;Markdown-only skill that ports the &lt;code&gt;claude -r&lt;/code&gt; workflow into &lt;a class="link" href="https://openai.com/codex/" target="_blank" rel="noopener"
 &gt;OpenAI Codex CLI&lt;/a&gt;, so a single &lt;code&gt;codex -r&lt;/code&gt; command opens a picker over your &lt;a class="link" href="https://www.anthropic.com/claude-code" target="_blank" rel="noopener"
 &gt;Claude Code&lt;/a&gt; sessions and imports the one you choose.&lt;/strong&gt; There is almost no code — the artifact is a single SKILL.md following the &lt;a class="link" href="https://github.com/anthropics/skills" target="_blank" rel="noopener"
 &gt;agent-skills&lt;/a&gt; pattern. The interesting question is not the star count; it is &lt;strong&gt;why someone built this and what it signals.&lt;/strong&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;Update (around 2026-05-04):&lt;/strong&gt; in the same week, &lt;a class="link" href="https://help.openai.com/en/articles/11369540-codex-in-chatgpt" target="_blank" rel="noopener"
 &gt;Codex landed inside ChatGPT&lt;/a&gt; and the &lt;a class="link" href="https://github.com/openai/codex/tree/main/sdk/python" target="_blank" rel="noopener"
 &gt;Codex Python SDK&lt;/a&gt; showed up in the monorepo. The analysis below still holds, but the &amp;ldquo;Codex Surface Expansion&amp;rdquo; section near the end reframes what these shifts mean for a bridge like this.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;pre class="mermaid" style="visibility:hidden"&gt;graph LR
 User["user"] --&gt;|"codex -r"| Wrapper["thin wrapper"]
 Wrapper --&gt; Picker["session picker"]
 Picker --&gt;|"scans ~/.claude/projects/**/*.jsonl"| Claude["Claude Code sessions"]
 Picker --&gt;|"selection"| Import["externalAgentConfig/import"]
 Import --&gt; Ledger["~/.codex/external_agent_session_imports.json"]
 Ledger --&gt;|"codex resume threadId"| Resume["Codex session resumed"]&lt;/pre&gt;&lt;h2 id="the-problem"&gt;The Problem
&lt;/h2&gt;&lt;p&gt;Codex CLI 0.128.0 added &lt;code&gt;external agent session import&lt;/code&gt;, but the trigger is awkward.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The TUI prompt only appears when the &lt;code&gt;external_migration&lt;/code&gt; feature flag is on and the session enters the trust onboarding flow.&lt;/li&gt;
&lt;li&gt;In projects that are already trusted, you may never see the prompt.&lt;/li&gt;
&lt;li&gt;A large &lt;code&gt;~/.claude/projects&lt;/code&gt; folder makes home-wide detection slow.&lt;/li&gt;
&lt;li&gt;Existing shell aliases route &lt;code&gt;codex -r&lt;/code&gt; straight to the real Codex binary, which exits with &lt;code&gt;unexpected argument '-r'&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The feature exists, but &lt;strong&gt;the path to use it is a scavenger hunt.&lt;/strong&gt; CODEX-R turns the hunt into a single picker behind a thin wrapper.&lt;/p&gt;
&lt;h2 id="what-codex-r-does"&gt;What CODEX-R Does
&lt;/h2&gt;&lt;p&gt;The whole skill is one SKILL.md. Invoking &lt;code&gt;$codex-r&lt;/code&gt; from a Codex session teaches Codex three things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;How to set up a &lt;code&gt;codex&lt;/code&gt; thin wrapper&lt;/li&gt;
&lt;li&gt;The Claude Code session picker behavior&lt;/li&gt;
&lt;li&gt;The safety verification commands&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex -r &lt;span class="c1"&gt;# open picker, import on selection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex -r daybreak &lt;span class="c1"&gt;# show only ~/ws/daybreak sessions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex -r --cwd ~/ws/kb &lt;span class="c1"&gt;# sessions for a specific directory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex -r --recursive &lt;span class="c1"&gt;# include child directories&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex -r --all daybreak &lt;span class="c1"&gt;# text-search all sessions&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex -r --list --limit &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="c1"&gt;# list only, no import&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;codex -r --dry-run --limit &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="safety-contract"&gt;Safety Contract
&lt;/h2&gt;&lt;p&gt;The author is explicit about &lt;strong&gt;one rule: setup verification must never import.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--list&lt;/code&gt; and &lt;code&gt;--dry-run&lt;/code&gt; never import, period.&lt;/li&gt;
&lt;li&gt;An import only happens after the user explicitly selects a session.&lt;/li&gt;
&lt;li&gt;The default shows only Claude sessions whose recorded cwd exactly matches the current directory.&lt;/li&gt;
&lt;li&gt;If Codex later ships an official &lt;code&gt;-r&lt;/code&gt;, the wrapper steps aside.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CODEX-R does not copy Claude&amp;rsquo;s settings, &lt;a class="link" href="https://modelcontextprotocol.io/" target="_blank" rel="noopener"
 &gt;MCP&lt;/a&gt; servers, plugins, or skills. &lt;strong&gt;It only imports session JSONL files through Codex&amp;rsquo;s own app-server migration API.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="how-it-works-codex-internals"&gt;How It Works (Codex Internals)
&lt;/h2&gt;&lt;pre class="mermaid" style="visibility:hidden"&gt;flowchart TD
 A["~/.claude/projects/**/*.jsonl"] --&gt;|"file scan"| B["picker UI"]
 B --&gt;|"user selects"| C["externalAgentConfig/import RPC"]
 C --&gt;|"SESSIONS migration item"| D["Codex app-server"]
 D --&gt;|"externalAgentConfig/import/completed"| E["update import ledger"]
 E --&gt;|"extract threadId"| F["codex resume threadId"]
 F -.-&gt;|"on failure"| G["codex resume --all fallback"]&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Feature flag — &lt;code&gt;external_migration&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Claude session source — &lt;code&gt;~/.claude/projects/**/*.jsonl&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Import RPC — &lt;code&gt;externalAgentConfig/import&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Completion event — &lt;code&gt;externalAgentConfig/import/completed&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Import ledger — &lt;code&gt;~/.codex/external_agent_session_imports.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A single session is imported as a SESSIONS migration item; the helper reads the threadId from the ledger and runs &lt;code&gt;codex resume &amp;lt;threadId&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="install"&gt;Install
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/thedalbee/codex-r.git ~/ws/codex-r
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ln -sfn ~/ws/codex-r ~/.codex/skills/codex-r
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# in a fresh Codex session:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;$codex&lt;/span&gt;-r
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;No installer script. One symlink and a skill invocation, and you are done.&lt;/p&gt;
&lt;h2 id="why-this-matters"&gt;Why This Matters
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;A clean example of &lt;strong&gt;users wrapping an official feature in an ergonomic shell&lt;/strong&gt;. The 0.128.0 import RPC was already there; the surface was missing; a user wrote a 30-line thin wrapper to expose it.&lt;/li&gt;
&lt;li&gt;The Markdown-only-skill shape is the real story. It is a signal that Codex has adopted the &lt;a class="link" href="https://github.com/anthropics/skills" target="_blank" rel="noopener"
 &gt;Anthropic agent-skills&lt;/a&gt; pattern, and that compatibility lets a single person ship a working tool in a day.&lt;/li&gt;
&lt;li&gt;Three stars is small, but the pattern is big — &lt;strong&gt;agent session portability is becoming load-bearing.&lt;/strong&gt; The same week that surfaced this also brought &lt;a class="link" href="https://github.com/AutonomousResearchGroup/agentmemory" target="_blank" rel="noopener"
 &gt;agentmemory&lt;/a&gt;, another user-led standardization attempt for agent memory.&lt;/li&gt;
&lt;li&gt;The agent infrastructure layer is standardizing fast, and users are gluing it together before model vendors do.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="codex-surface-expansion"&gt;Codex Surface Expansion
&lt;/h2&gt;&lt;p&gt;When this post was first written, Codex effectively meant the CLI. A few days later that picture has widened. OpenAI &lt;a class="link" href="https://help.openai.com/en/articles/11369540-codex-in-chatgpt" target="_blank" rel="noopener"
 &gt;pulled Codex inside ChatGPT itself&lt;/a&gt; — 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 — &lt;strong&gt;&lt;a class="link" href="http://developers.openai.com/codex/app" target="_blank" rel="noopener"
 &gt;Codex app&lt;/a&gt;, &lt;a class="link" href="https://developers.openai.com/codex/cli" target="_blank" rel="noopener"
 &gt;Codex CLI&lt;/a&gt;, &lt;a class="link" href="http://developers.openai.com/codex/ide" target="_blank" rel="noopener"
 &gt;Codex IDE extension&lt;/a&gt;, and &lt;a class="link" href="https://chatgpt.com/codex" target="_blank" rel="noopener"
 &gt;Codex web at chatgpt.com/codex&lt;/a&gt;&lt;/strong&gt; — all sharing one ChatGPT login. Almost at the same moment, a &lt;a class="link" href="https://github.com/openai/codex/tree/main/sdk/python" target="_blank" rel="noopener"
 &gt;Codex Python SDK&lt;/a&gt; landed at &lt;code&gt;sdk/python&lt;/code&gt; in the &lt;code&gt;openai/codex&lt;/code&gt; monorepo: an experimental Pydantic SDK wrapping &lt;code&gt;app-server&lt;/code&gt; JSON-RPC v2 over stdio, where &lt;code&gt;with Codex() as codex: codex.thread_start(model=&amp;quot;gpt-5&amp;quot;)&lt;/code&gt; is enough to manage a thread&amp;rsquo;s lifecycle. The packaging splits into &lt;code&gt;openai-codex-app-server-sdk&lt;/code&gt; plus a platform-wheel runtime &lt;code&gt;openai-codex-cli-bin&lt;/code&gt;, with &lt;strong&gt;the SDK version pinned to the underlying Codex runtime version.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;These two shifts cut both ways for a bridge like codex-r. On one side, &lt;strong&gt;there is more surface to bridge from&lt;/strong&gt; — Codex threads can be opened from CLI, IDE extension, web UI, or any Python process, and once app-server RPCs like &lt;a class="link" href="https://github.com/openai/codex" target="_blank" rel="noopener"
 &gt;&lt;code&gt;externalAgentConfig/import&lt;/code&gt;&lt;/a&gt; become first-class SDK calls, the picker can be rewritten as a Python script. On the other side, &lt;strong&gt;the bridge&amp;rsquo;s location is wobbling&lt;/strong&gt; — inside ChatGPT, Codex now ships with &lt;a class="link" href="https://developers.openai.com/codex/memories" target="_blank" rel="noopener"
 &gt;Memories&lt;/a&gt;, &lt;a class="link" href="https://developers.openai.com/codex/app/automations" target="_blank" rel="noopener"
 &gt;Automations&lt;/a&gt;, an &lt;a class="link" href="https://developers.openai.com/codex/app/browser" target="_blank" rel="noopener"
 &gt;in-app browser&lt;/a&gt;, and &lt;a class="link" href="https://developers.openai.com/codex/app/computer-use" target="_blank" rel="noopener"
 &gt;Computer Use&lt;/a&gt;, which together feel closer to &amp;ldquo;Claude Code, but inside ChatGPT&amp;rdquo; 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&amp;rsquo;s single SKILL.md is a useful tell for where that next round absorbs.&lt;/p&gt;
&lt;h2 id="insights"&gt;Insights
&lt;/h2&gt;&lt;p&gt;The meaning of this tool is not in the 30 lines of wrapper; it is in &lt;strong&gt;the fact that the wrapper exists at all.&lt;/strong&gt; 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. &lt;strong&gt;The real asset here is the pattern, not the tool.&lt;/strong&gt; When users define ergonomics before the official feature does, the official feature ends up following them.&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Repo&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/thedalbee/codex-r" target="_blank" rel="noopener"
 &gt;thedalbee/codex-r&lt;/a&gt; — MIT, three stars, created 2026-05-01&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/thedalbee/codex-r/blob/main/README.md" target="_blank" rel="noopener"
 &gt;README.md / SKILL.md&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Related tools&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://openai.com/codex/" target="_blank" rel="noopener"
 &gt;OpenAI Codex CLI&lt;/a&gt; — the external agent session import in 0.128.0 is the foundation this skill builds on&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.anthropic.com/claude-code" target="_blank" rel="noopener"
 &gt;Claude Code&lt;/a&gt; — source of the &lt;code&gt;~/.claude/projects/**/*.jsonl&lt;/code&gt; files used for import&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/anthropics/skills" target="_blank" rel="noopener"
 &gt;Anthropic agent-skills&lt;/a&gt; — the Markdown-only-skill pattern this project follows&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://modelcontextprotocol.io/" target="_blank" rel="noopener"
 &gt;MCP (Model Context Protocol)&lt;/a&gt; — the broader agent standards layer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Codex Surface Expansion (around 2026-05-04)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://help.openai.com/en/articles/11369540-codex-in-chatgpt" target="_blank" rel="noopener"
 &gt;Codex in ChatGPT — OpenAI Help Center&lt;/a&gt; — Codex usage bundled with ChatGPT plans across four entry points (app, CLI, IDE, web)&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/openai/codex/tree/main/sdk/python" target="_blank" rel="noopener"
 &gt;Codex Python SDK — &lt;code&gt;openai/codex/sdk/python&lt;/code&gt;&lt;/a&gt; — experimental Pydantic SDK over &lt;code&gt;app-server&lt;/code&gt; JSON-RPC v2 (&lt;code&gt;openai-codex-app-server-sdk&lt;/code&gt; + &lt;code&gt;openai-codex-cli-bin&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://chatgpt.com/codex" target="_blank" rel="noopener"
 &gt;Codex web (chatgpt.com/codex)&lt;/a&gt; — cloud Codex entry point that connects to your GitHub account&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://developers.openai.com/codex/" target="_blank" rel="noopener"
 &gt;Codex developer docs hub&lt;/a&gt; — models, memories, automations, computer use — the ChatGPT-integrated surface&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/AutonomousResearchGroup/agentmemory" target="_blank" rel="noopener"
 &gt;agentmemory&lt;/a&gt; — a same-period user-led memory standardization attempt (covered in a related post)&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://docs.claude.com/en/docs/claude-code" target="_blank" rel="noopener"
 &gt;Claude Code documentation&lt;/a&gt; — JSONL transcript structure used by the picker&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>