Skip to content

feat: read Claude Code sessions directly from the Claude home directory - #113

Open
scode wants to merge 1 commit into
hookless/1-state-tomlfrom
hookless/2-claude-scan
Open

feat: read Claude Code sessions directly from the Claude home directory#113
scode wants to merge 1 commit into
hookless/1-state-tomlfrom
hookless/2-claude-scan

Conversation

@scode

@scode scode commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Second step of the hookless transition (lore/hookless-migration.md): distill no longer depends on the SessionEnd
hook having copied a transcript — it reads Claude Code's own session store, with the Codex watermark model generalized
to both harnesses. The hook keeps running in this revision; a session present in both places is emitted once.

Two semantics deserve attention beyond the diff:

  • last_distilled doubles as a floor for the scan, so the first scan-enabled distill does not replay the retention
    window the legacy flow already learned from. For the same reason fresh installs now stamp install time instead of
    epoch 0, which would ingest weeks of pre-install history the old system never saw.
  • mark-distilled now adopts the scan-start time distill staged rather than its own wall clock. That closes a window
    where a session born between the scan and the mark would sit below the floor forever — the legacy flow silently
    deleted such logs as obsolete, so this fixes an inherited loss, not just a new one.

The scanner treats projects/ as an undocumented, untrusted layout: UUID-stem allowlist, symlinks rejected at read
time via handle identity (not just at discovery), and labels sanitized before they reach tag-attribute position.

changelog: include

@scode
scode force-pushed the hookless/2-claude-scan branch from 28877e1 to 6eea715 Compare July 7, 2026 00:48
@scode
scode force-pushed the hookless/1-state-toml branch from 8b621fe to 550afbb Compare July 7, 2026 00:48
@scode
scode force-pushed the hookless/2-claude-scan branch from 6eea715 to 16a451f Compare July 7, 2026 06:17
@scode
scode force-pushed the hookless/1-state-toml branch from 550afbb to 14f6242 Compare July 7, 2026 06:17
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