<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Terminal Tools on ICE-ICE-BEAR-BLOG</title><link>https://ice-ice-bear.github.io/tags/terminal-tools/</link><description>Recent content in Terminal Tools 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/terminal-tools/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;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="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;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>