explaingit

liwala/session-porter

19TypeScriptAudience · developerComplexity · 3/5ActiveLicenseSetup · easy

TLDR

CLI that moves a chat session between Claude Code and Codex CLI by reading and rewriting their local JSONL files. Includes list, transfer, fork, export, handoff, and doctor commands.

Mindmap

mindmap
  root((session-porter))
    Inputs
      Claude Code JSONL
      Codex CLI JSONL
    Outputs
      Converted session
      Markdown export
      Handoff brief
    Use Cases
      Switch agents mid-task
      Fork a session
      Audit tool calls
    Tech Stack
      TypeScript
      Node
      npm
      JSONL

Things people build with this

USE CASE 1

Move an in-progress Claude Code chat into Codex CLI and resume it there

USE CASE 2

Fork the last few turns of a session into a new chat without touching the original

USE CASE 3

Export a session as Markdown or JSON for archiving or sharing

USE CASE 4

Produce a compressed handoff brief to paste into an unsupported agent

Tech stack

TypeScriptNodenpm

Getting it running

Difficulty · easy Time to first run · 5min

Requires Node and a local install of either Claude Code or Codex CLI so there are JSONL session files to read.

MIT license, you can use, modify, and ship it commercially as long as you keep the copyright notice.

In plain English

session-porter is a small command-line tool that lets you move a coding chat session from one AI coding assistant to another. Right now the two assistants it supports are Claude Code and Codex CLI. Both of those store each conversation as a JSONL file on your computer, and session-porter reads those files, converts between the two formats, and writes the converted session into the target tool's folder so you can pick the chat back up there. The README is clear that everything happens locally. There is no cloud service, no account, and no API key required. You install it with npm install -g @liwala/session-porter, or by cloning the repo and running npm link. Once installed, a typical flow is to run session-porter list to see what sessions are available, session-porter summary to look at one in more detail, then session-porter transfer to move it across. After that you run the target tool, for example codex resume, to continue the conversation. The tool offers a handful of commands beyond plain transfer. show prints the user and assistant exchanges. export saves a session as JSON, Markdown, or in the native JSONL format of either tool. fork copies only part of a session, for example only the last few turns or everything from a given turn onward, while leaving the original alone. continue does a transfer and then launches the target CLI in one step. handoff produces a compressed context brief that can be pasted into any agent, including ones that do not yet have an adapter. There is also a full-text search command, an aggregate stats command, and a doctor command that checks for broken SKILL.md or CLAUDE.md files and missing MCP server configurations. Under the hood, the project defines what it calls a universal tool taxonomy. Each tool call from either agent is mapped to a small set of generic operations such as file.read, file.write, file.edit, shell.exec and search.content. Adding support for a new agent means implementing an AgentAdapter interface, written in TypeScript, that knows how to list sessions, load them, write them, and translate between native tool names and the universal ops. The README is honest about what does not transfer. Plain user and assistant text, tool calls, timestamps and basic session metadata all carry over. Claude-specific thinking blocks, token-usage and billing data, system prompts, injected context and file-history snapshots do not. The project is released under the MIT licence.

Copy-paste prompts

Prompt 1
Install session-porter globally and walk me through transferring my latest Claude Code session to Codex CLI
Prompt 2
Use session-porter fork to copy the last 10 turns of my current session into a new branch
Prompt 3
Run session-porter doctor and explain any SKILL.md or MCP config issues it reports
Prompt 4
Write a new AgentAdapter in TypeScript for session-porter that supports another coding agent
Prompt 5
Show me how session-porter maps Claude tool calls onto the universal tool taxonomy
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.