Import the Claude Code and Codex sessions already on a machine

Open
#2,078 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
clickhouse, python

Research direction

Start with loom ingest-transcript, lib/session-brief.mjs, and the existing conversation hook to trace transcript parsing, redaction, and live capture. Then inspect the import contract in #159 and the retention and recording settings paths. Done means discovery, safe import of Claude Code and Codex sessions, incremental re-runs, and the stated acceptance checks work.

Written by the indexing model from the issue text.

Description

enhancement help wanted up-for-grabs
Company

ClickHouse

Component

CLI

Use case

Loom records a coding-agent session only once the plugin is connected. A person who installs it usually has months of sessions on disk, in ~/.claude/projects/<project>/*.jsonl and ~/.codex/sessions/, holding the project's decisions, dead ends and conventions. Loom starts with none of them. Recall abstains and the SessionStart primer has nothing to show for the first days, and those first days are when a new user decides whether to keep Loom.

The parts exist but nothing joins them:

  • loom ingest-transcript posts a finished transcript to conversation.append, but reads only a markdown file or a JSON array of {role, content}, one file at a time.
  • The plugins parse the Claude Code transcript format already (lib/session-brief.mjs, the conversation hook), but only for the session that is running.
Describe the solution you'd like

loom ingest-transcript learns the Claude Code and Codex session formats and can find them, and the first SessionStart primer after install offers it in one line.

  • --discover lists the sessions on the machine by project: session count, date range and size. Nothing is written until the person picks projects.
  • Each session goes through the same path as live capture: the plugins' client-side redaction, the namespace's recording setting and the conversation plane's retention. A session older than the retention window is skipped.
  • Rows carry the session's own timestamps and source_class imported, never observed.
  • The thread id is the session id, so a second run imports only new sessions.
  • Before it runs, the command states how many sessions go to extraction, which calls the model. --newest N limits the import.
  • The command only reads the files. It never changes or deletes them.

Acceptance: after importing one project, loom_search answers a question whose answer exists only in a session from before the install. A second run reports zero new sessions. A secret in an imported transcript is redacted as it is in live capture.

Describe alternatives you've considered
  • Wait for capture to fill the namespace. The first week stays empty.
  • Ingest the files as documents with knowledge.ingest. They become searchable, but nothing is extracted into memories or briefs and the session identity is lost.
Where the need comes from

An AI tool suggested this feature

Additional context

Related: #159. Its import contract applies: an import never turns uploaded claims into verified local facts.

Dominant language
Python
Stars
263
Forks
47
Avg merge
14h 13m
Merged PRs (30d)
868

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ClickHouse/loom

All issues in ClickHouse/loom

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.