Skip to content

Session Auto-Import

Ptah can discover and import sessions from the Claude CLI’s default storage folder, so everything you’ve been working on outside the app becomes browsable, searchable, and resumable inside it.

Auto-import banner

~/.claude/projects/

On Windows:

C:\Users\<you>\.claude\projects\

This is the standard folder the Claude CLI writes to. Each sub-folder is a project; each JSONL inside is a session transcript.

TriggerBehavior
First Ptah launchFull scan, shows an import dialog
Every subsequent launchIncremental scan (only new files)
File system watcherOngoing — picks up new CLI sessions in the background
CommandPtah: Re-scan Claude CLI sessions

For each discovered session, Ptah:

  1. Parses the JSONL transcript
  2. Extracts metadata — agent, model, timestamps, token counts
  3. Associates the session with a Ptah workspace by matching project paths
  4. Writes a native session record to <workspace>/.ptah/sessions/
  5. Marks the record with source: "claude-cli" and preserves the original path

The original CLI file is never modified or deleted.

Ptah uses the CLI project’s absolute path (stored in the transcript header) to match to an existing workspace. Three outcomes are possible:

  • Exact match — imported into that workspace silently.
  • No match — Ptah offers to create a new workspace from the CLI path.
  • Ambiguous (e.g., the folder was moved) — Ptah shows a disambiguation prompt.

Disambiguation prompt

In the import dialog you can:

  • Limit to sessions from the last N days
  • Include / exclude archived CLI sessions
  • Pick specific CLI projects
  • Dry-run (preview without writing)

Settings you pick are remembered for future auto-imports.

Imported sessions behave like native ones. Open one and click Continue to start a new turn. Ptah will:

  • Reuse the original model (overridable)
  • Load the full history into context
  • Offer to resume under the same agent if the CLI session had one

Settings → Sessions → Auto-import:

{
"ptah.autoImport.claudeCli": {
"enabled": false,
"scanPaths": [],
"watch": false
}
}

You can also add extra scan paths if your CLI installation writes to a non-default location.

SymptomFix
Nothing imported on first launchCheck ~/.claude/projects/ exists and contains JSONL files
Sessions show under the wrong workspaceUse the disambiguation prompt to relink
Auto-import runs every launch foreverRebuild index: Ptah: Rebuild Session Index
Permission denied readingClose the CLI, then re-run the scan