rses

March 26, 2026 · View on GitHub

Cross-resume between Claude Code, Codex CLI, and OpenCode. Pick up where one AI coding agent left off — in another.

rses claude with codex --last

That's it. Claude launches with full context from your last Codex session: the original task, git diff, conversation history, and a pointer to the session file for deep-dive.

Works in all 6 directions between Claude Code, Codex CLI, and OpenCode.

Install

npm i -g rses-cli

Node.js 22+ required (uses built-in SQLite).

Quick start

# You were working in Codex. Now you want Claude to continue.
rses claude with codex --last

# Or the other way around.
rses codex with claude --last

# OpenCode works too — any combination.
rses opencode with codex --last
rses claude with opencode --last

What it does

  1. Reads the source tool's session data (JSONL files or SQLite)
  2. Extracts: original task, git log since session start, working tree status, last N conversation turns
  3. Includes a pointer to the full session file so the receiving model can Read it for complete history
  4. Launches the target tool with a structured handoff prompt as the first message

The receiving model is oriented on turn one. No re-explaining.

Commands

Handoff (main command)

rses <target> with <source> [session-id] [flags]

# Examples
rses claude with codex --last                    # most recent Codex session
rses codex with claude ses_46f04b499ffe...       # specific Claude session
rses opencode with codex                         # interactive picker
rses claude with codex --last --dry-run           # print handoff, don't launch

List sessions

rses ls                    # all tools
rses ls codex              # just Codex
rses ls claude             # just Claude
rses ls opencode           # just OpenCode
rses ls codex --dir .      # filter by working directory

Export

rses export codex <id>           # print handoff to stdout
rses export claude <id> --turns 10

Aliases

Power-user shorthand — type less, ship faster:

AliasExpands to
cc, cl, cclaude
cdx, cx, xcodex
oc, oopencode
wwith
rses cc w cdx --last          # same as: rses claude with codex --last
rses x w oc --last            # same as: rses codex with opencode --last
rses ls cx                    # same as: rses ls codex

Flags

FlagDescription
--lastUse most recent session (no picker, no ID needed)
--dry-runPrint the handoff text without launching
--dir <path>Filter sessions by working directory
--turns <n>Number of conversation turns to include (default: 6)

Everything else is passed through to the target tool:

rses claude with codex --last --dangerously-skip-permissions --model opus
rses codex with claude --last --model o3-pro
rses opencode with claude --last --provider anthropic

How sessions are read

ToolSourceUpgrade-safe
Claude Code~/.claude/transcripts/ses_*.jsonlReads only user/assistant types
Codex CLI~/.codex/state_*.sqlite (auto-discovers version) + JSONL fallbackHandles both 2025 and 2026 schemas
OpenCode~/.local/share/opencode/opencode.dbSingle JOIN query, reads stable columns only

All parsers are read-only and wrapped in try/catch — if a tool changes its format, rses degrades gracefully instead of crashing.

Requirements

License

MIT