Import your history
Once the CLI is set up and your first session is captured, you’ll usually want to backfill the work you ran before the hooks were in place. This is the last step in the standard onboarding flow.
Two commands handle the backfill: kapacitor import for Claude and Codex (which write .jsonl transcripts to disk), and kapacitor cursor import for Cursor IDE (which stores Composer/Agent-mode sessions in a local SQLite database). Both are idempotent — re-run them as often as you like, only missing or incomplete sessions get uploaded.
You can also come back to this page later. Importing isn’t strictly an onboarding step; the same commands work for one-off backfills (“I’d forgotten about that session from last month, let me import just that one”).
Claude and Codex: kapacitor import
Section titled “Claude and Codex: kapacitor import”kapacitor import --all # every session discovered on this machinekapacitor import --org # sessions whose repo owner matches your active profile namekapacitor import --repo owner/repo # one specific repokapacitor import --repo . # the repo at the current cwdYou must pick an explicit scope. This is deliberate: without it, the command would happily upload your personal scratch repos, your private notes, and your client work to whichever tenant you happened to be logged into. If you run with no scope on an interactive terminal, you’ll get a picker. In a non-interactive run (no TTY, e.g. CI), missing both a scope flag and --yes is an error.
--org is a shortcut: it takes your active profile name and uses it as a GitHub org login to filter on. kapacitor setup names the profile after the picked tenant, so --org works out of the box for tenant-bound profiles. On the default profile, or a manually-named profile like work, use --repo <owner/name> instead.
Each run shows a confirmation summary (scope, matched count, repo samples, visibility) before uploading anything.
Useful flags:
kapacitor import --org --yes # skip confirmationkapacitor import --org --private # mark every imported session as Only Visible to Youkapacitor import --codex --org # Codex rollouts from ~/.codex/sessionskapacitor import --org --since 2026-01-01 # on or after this datekapacitor import --org --cwd /path/to/project # filter by working directorykapacitor import --org --session abc123 # single sessionThe command is resumable. Re-running with the same scope only uploads what’s missing or incomplete — there’s no “import was interrupted, start over” failure mode.
Source paths:
- Claude:
~/.claude/projects/ - Codex (with
--codex):~/.codex/sessions/
Cursor: kapacitor cursor import
Section titled “Cursor: kapacitor cursor import”Cursor IDE doesn’t have a hook API, so its Composer/Agent-mode sessions can’t be captured live. Import them post-hoc from Cursor’s local SQLite state:
kapacitor cursor import # the current directory's Cursor workspacekapacitor cursor import --workspace /path/to/projkapacitor cursor import --all # every Cursor workspaceOnly Composer/Agent-mode sessions are imported. Chat (Ask), Inline Edit (Cmd+K), and Tab autocomplete don’t fit the session model and are skipped. Sessions whose bubbles are still being generated are skipped until idle, so you don’t end up with half-imported turns.
Re-running is safe — a server-side tracker deduplicates events on (stream, eventId), so previously imported turns don’t get re-appended.
What gets uploaded
Section titled “What gets uploaded”For each session, Kapacitor uploads everything it would have captured live: lifecycle events, transcript turns, tool calls, token counts. There’s no separate sanitisation step — past sessions land in the dashboard exactly as new sessions do.
If a past session contains data you don’t want on the server, either:
- Run with
--privateto keep it owner-only. - Skip it by scoping the import (
--repoor--cwd) to exclude it. - After import, delete it from the server with
kapacitor disable <sessionId>(irreversible server-side).
Related
Section titled “Related”- Visibility & sharing — defaults and overrides for imported sessions.
- CLI commands — the full set, including
kapacitor disable.