# AI use cases for Session Migrate (xhluca/session-migrate)

Repo: [xhluca/session-migrate](https://github.com/xhluca/session-migrate) | Use cases: 4 | Page: https://dedupedai.com/use-cases/xhluca-session-migrate/

A Python CLI (session-migrate, shorthand smigrate) that moves coding agent sessions between about 18 harnesses, such as Claude Code, Codex, Pi, and OpenCode, so the target client can resume them natively.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Continue a Claude Code session in Codex: https://dedupedai.com/use-cases/xhluca-session-migrate/move-claude-session-to-codex/
- Find an old session by title and move it to Pi: https://dedupedai.com/use-cases/xhluca-session-migrate/find-old-session-by-title-and-move-to-pi/
- Inspect a native transcript before migrating it: https://dedupedai.com/use-cases/xhluca-session-migrate/inspect-native-transcript-before-migrating/
- Have a coding agent run the migration for you: https://dedupedai.com/use-cases/xhluca-session-migrate/agent-runs-session-migration-from-procedure/

## How to continue a Claude Code session in Codex with Session Migrate

Repo: [xhluca/session-migrate](https://github.com/xhluca/session-migrate) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Transfer a Claude Code session into Codex and resume it in the same project directory.

**Who it is for:** A developer who started a task in Claude Code and wants to continue it in Codex without re-explaining the context.

**The problem:** Switching coding agents usually loses the conversation history and the work already done in the earlier session.

**The outcome:** A new native Codex session with the earlier messages and tool results, which the developer can resume from the project folder.

### Steps

1. Install the CLI with `uv tool install session-migrate`.
2. Find the Claude Code session UUID you want to move.
3. Run `smigrate transfer SESSION_UUID --from claude --to codex --cwd "$PWD"` from the project directory.
4. Note the NEW_SESSION_UUID that the transfer prints.
5. Resume the session with `codex resume NEW_SESSION_UUID`.

### Prompt to paste into your agent

```text
Use the xhluca/session-migrate repo to transfer the Claude Code session with UUID <SESSION_UUID> to <TARGET> (codex) using --cwd set to the current project directory. Report the new session UUID the command prints. Verify that the report includes a new target session ID and that the source Claude transcript was not modified.
```

### Caveat

The README says same-format or cross-format migration creates a new independent session, not a live sync, so later edits in one client will not appear in the other.

Risk, credentials: The transcript is copied into a new session file; check that it holds no secrets you do not want in the Codex session store, since auth and config stay with the source client but conversation text moves.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/xhluca-session-migrate/move-claude-session-to-codex/

## How to find an old session by title and move it to Pi with Session Migrate

Repo: [xhluca/session-migrate](https://github.com/xhluca/session-migrate) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Search the session catalog by title or name, then transfer the match into Pi.

**Who it is for:** A developer who remembers the topic of an older agent conversation but not its ID, and wants to continue it in Pi.

**The problem:** Native clients list sessions by ID or picker entry, so finding one from months ago means scanning many files by hand.

**The outcome:** The matching session is found by keywords and copied into Pi as a new resumable session.

### Steps

1. Install the CLI with `uv tool install session-migrate`.
2. Build the index with `smigrate catalog refresh`.
3. Search with `smigrate catalog search "oauth refresh" --format claude`, replacing the keywords with your own.
4. Transfer the match with `smigrate transfer --title "oauth refresh" --from claude --to pi`.
5. Open the migrated session in Pi from its session list.

### Prompt to paste into your agent

```text
Use the xhluca/session-migrate repo to run `catalog refresh`, then search for the keywords <TITLE KEYWORDS> in Claude Code sessions and transfer the best match to <TARGET> (pi). Report the matched title and the new session identifier. Verify that the search matched only native titles, names, or IDs and that the transfer output lists the new Pi session.
```

### Caveat

The README says search covers native titles, names, and IDs but not conversation bodies, and that catalog refresh does not crawl the whole disk, so sessions outside the default or registered roots will not appear.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/xhluca-session-migrate/find-old-session-by-title-and-move-to-pi/

## How to inspect a native transcript before migrating it with Session Migrate

Repo: [xhluca/session-migrate](https://github.com/xhluca/session-migrate) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Check a session file's structure without printing its conversation.

**Who it is for:** A developer who wants to confirm a transcript is valid and see what it holds before moving it to another client.

**The problem:** Opening a raw session file to check it risks exposing private conversation text on screen or in logs.

**The outcome:** A summary of the transcript's structure printed to the terminal, with no conversation text shown, so the developer can decide whether to migrate it.

### Steps

1. Install the CLI with `uv tool install session-migrate`.
2. Locate the native transcript file in the source client's data folder.
3. Run `smigrate inspect ~/.claude/projects/-work/SESSION.jsonl`, replacing the path with your file.
4. Review the output and decide whether to run a transfer.

### Prompt to paste into your agent

```text
Use the xhluca/session-migrate repo to inspect the native transcript at <PATH TO TRANSCRIPT> with `smigrate inspect`. Report the structural summary the command prints. Verify that the output does not print conversation text.
```

### Caveat

The README describes inspect as showing a native transcript without printing its conversation, but it does not list every field the summary contains, so check the CLI reference for details.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/xhluca-session-migrate/inspect-native-transcript-before-migrating/

## How to have a coding agent run the migration for you with Session Migrate

Repo: [xhluca/session-migrate](https://github.com/xhluca/session-migrate) | Difficulty: Beginner | Time: 30 minutes | Basis: From the README

Give the procedure link to your coding agent and let it move the session.

**Who it is for:** A developer working inside Claude Code or Codex who wants the agent to run the migration with a fixed, tested procedure.

**The problem:** Writing the exact migration commands and checking their output by hand takes time and invites small mistakes.

**The outcome:** The coding agent follows the published procedure, runs the transfer for the chosen session, and reports the new target session.

### Steps

1. Pick the source client, the target client, and the session UUID or title.
2. Open the project website at https://session-migrate.github.io/ to choose the route.
3. Give your coding agent this instruction, replacing the bracketed values: "Follow https://session-migrate.github.io/llms.txt to migrate a session from `[SOURCE]` to `[TARGET]`. Session: `[UUID OR TITLE]`"
4. Read the agent's report and confirm the new target session identifier.
5. Resume the migrated session in the target client.

### Prompt to paste into your agent

```text
Follow https://session-migrate.github.io/llms.txt from the xhluca/session-migrate project to migrate the session <UUID OR TITLE> from <SOURCE> to <TARGET>. Report the new session identifier and the manifest summary. Verify that the report states the source session was not modified and lists any omitted data.
```

### Caveat

The README says the linked procedure is sandbox-tested with Claude Code and Codex only, so other agents may need closer supervision.

Risk, remote script: The agent fetches and follows a procedure from a remote URL, so review the linked steps before letting it run commands on your machine.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/xhluca-session-migrate/agent-runs-session-migration-from-procedure/
