Skip to content

feat: add import-session command for manual Claude Code session import#324

Open
fahd04 wants to merge 1 commit intoentireio:mainfrom
fahd04:feat/import-session
Open

feat: add import-session command for manual Claude Code session import#324
fahd04 wants to merge 1 commit intoentireio:mainfrom
fahd04:feat/import-session

Conversation

@fahd04
Copy link

@fahd04 fahd04 commented Feb 13, 2026

Summary

Adds entire import-session command to manually import Claude Code session transcripts into Entire checkpoints.

Motivation

Closes #287

Two main use cases:

  1. Recover sessions that weren't properly checkpointed due to bugs
  2. Onboard a repository with existing Claude Code sessions

Changes

  • New command: entire import-session <path> [paths...] [--commit <hash>]
  • Reads Claude Code JSONL transcripts, extracts modified files and prompts
  • Writes checkpoint metadata to entire/checkpoints/v1 via existing WriteCommitted API
  • Supports multiple sessions per call (stored as multi-session checkpoint)
  • Prints instructions for adding Entire-Checkpoint trailer; warns about history rewrite when targeting past commits

Testing

  • Integration tests: TestImportSession_ImportToHEAD, TestImportSession_MultipleSessions, TestImportSession_RequiresEnabled
  • Integration test setup now sets enabled: true in settings so commands run as expected

Implements entireio#287. Allows importing Claude Code JSONL transcripts into Entire
checkpoints, useful for:
- Recovering sessions that weren't checkpointed (e.g., due to bugs)
- Adopting Entire in repos with existing sessions

Usage:
  entire import-session path/to/session.jsonl [path2.jsonl ...]
  entire import-session session.jsonl --commit <hash>

Metadata is written to entire/checkpoints/v1. The command prints instructions
for adding the Entire-Checkpoint trailer to link the commit to the checkpoint.
When targeting a past commit, warns about history rewrite and force push.
@fahd04 fahd04 requested a review from a team as a code owner February 13, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Manually Importing Claude Code sessions

2 participants