Skip to content

feat: import historical Claude Code sessions - #23

Merged
davidrobertson merged 4 commits into
mainfrom
codex/feat/import-claude-sessions
Aug 16, 2026
Merged

feat: import historical Claude Code sessions#23
davidrobertson merged 4 commits into
mainfrom
codex/feat/import-claude-sessions

Conversation

@davidrobertson

Copy link
Copy Markdown
Contributor

Summary

  • import historical Claude Code sessions from ~/.claude/projects, explicit paths, and --all
  • keep Claude parsing, source discovery, format dispatch, event identity, and daemon ingestion in separate modules
  • add synthetic coverage for visible messages, completed tools, malformed records, sidechains, metadata, idempotence, CLI selection, and discovery
  • add CONTRIBUTING.md and update README, architecture, troubleshooting, Claude setup guidance, and every repository AGENTS.md

Validation

  • npm run typecheck
  • npm test: 385 tests, 0 failures
  • npm run smoke
  • npm pack --dry-run
  • strict TypeScript no-excuse audit
  • independent HEAVY review: approved with no findings

Real Claude Code 2.1.228 QA used copies of 11 local project session files in isolated Agent LCM stores. The first import produced 10 sessions and 91 events with 0 rejected records and 0 failures. The second import produced 91 duplicates and no new events. Session listing and Claude-scoped MCP search succeeded. Source hashes were unchanged, both test daemons were stopped, and all copied data and temporary stores were removed.

Scope and risk

The importer reads primary project JSONL files and skips metadata, thinking blocks, sidechains, subagents transcripts, orphan tool results, and incomplete tool calls. It does not read ~/.claude/history.jsonl or rely on Claude's session index.

@davidrobertson
davidrobertson merged commit 428fac3 into main Aug 16, 2026
3 checks passed
@davidrobertson
davidrobertson deleted the codex/feat/import-claude-sessions branch August 16, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant