# Session import

Claude Code transcripts in ~/.claude/projects and Codex rollouts in ~/.codex/sessions are read, credentials are removed, and each becomes one OpenProgram conversation in the project of the folder it ran in.

| From | Do |
| --- | --- |
| Web UI | **Settings** › **Import**: one list per agent, **Import** or **Update** on each row |
| CLI | `openprogram sessions import` (`--from all\|claude-code\|codex`, default `all`) (`--since DAYS`) (`--dry-run`: what would be created or appended, decided as the import decides, nothing imported) (`--list`: every conversation found, with its state) (`PATH ...`: only these transcript files) |
| HTTP | `GET /api/sessions/import/candidates`, `POST /api/sessions/import` |

Claude Code is read from `$CLAUDE_CONFIG_DIR` when set, Codex from `$CODEX_HOME`.

## What comes across

| Part | Rule |
| --- | --- |
| Title | The name the agent shows: a renamed title, its generated title, else the first message |
| Messages | What you typed, with each reply's text, thinking and tool calls with their results, at their original times |
| Model | Recorded on each reply |
| Folder | The conversation joins the project of the folder it ran in, which is added when missing; the home folder or a folder that is gone means the default project |
| Rewound Claude Code turns | Only the branch you last saw |
| Left out | System reminders, environment and `AGENTS.md` context, sub-agent transcripts, conversations with no reply |

## Credentials

Sign-in files (`~/.claude/.credentials.json`, `~/.codex/auth.json`) are never read. Inside transcripts, provider keys, GitHub, Slack, AWS and Google tokens, JWTs, private keys, `Bearer …` and `password=…` values, and tool arguments named like `api_key` or `token` become `[secret removed]`, in titles and in the listing's cache as well. The original transcripts are not changed.

## Importing again

| Since the last import | Result |
| --- | --- |
| Nothing new | Skipped, nothing written |
| New messages | Appended to the same conversation |
| Rewound in the other agent, or continued here | A new conversation; nothing already here is rewritten |
| Imported conversation deleted here | Imported again as new |

## Conversations in other apps

Conversations in the Codex app and the Codex CLI, the Claude app's Code tab, DeepSeek Harness, Antigravity (the app and `agy`), Cursor (the editor's agent chats and `cursor-agent`) and Hermes Agent need no import.

They show up in the sidebar and on the History page by themselves (the Source filter picks one app). A Codex conversation carries the Codex logo at the row's end.

What you say in the app arrives as it is written: each reply block within a second. While the app answers, the row shows running and the reply shows Thinking… or the tool at work.

| You want to | Do |
| --- | --- |
| Keep talking in Codex | Just send: the same Codex thread continues, and the app shows the new turns |
| Go on with a Claude or DeepSeek Harness conversation | Just send: it continues in OpenProgram; the app keeps its own copy |
| Move it to OpenProgram | Switch its Harness chip to OpenProgram; the mark goes away. What you later say in the app still arrives |

[Session export](https://openprogram.io/docs/reference/session-export.html) · [CLI commands](https://openprogram.io/docs/reference/cli.html)
