Repository navigation
v0.4.0 — Claude compaction continuity
agentic-rag 0.4.0 — Claude compaction continuity
This release brings the session continuity shipped for Codex in 0.3.0 to
Claude Code, bound to Claude's own hook contract, on the same provider-neutral
PostgreSQL + pgvector checkpoint store.
Highlights
- Six Claude lifecycle hooks from the default
rag install:PreCompact
delivers the versioned compact instructions through hook stdout,
PostCompactstores Claude'scompact_summaryas a bounded, secret-stripped
handoff on the checkpoint,SessionStartrestores it with an age label, and
SessionEndqueues the final transcript delta for every Claude reason. - A managed 1M/500K Claude policy:
autoCompactWindow = 500000, a warning
(never a rewrite) for models without the[1m]suffix, and warnings for
overriding environment variables. SessionStartoutput capped at Claude's 10,000-character hook limit, with
the checkpoint shortened into the remaining budget before any section is
dropped and every cut announced.- A previewable, recoverable Claude install:
rag install --check, unique
settings.jsonbackups, a mode-0600 rollback record, and a target-aware
rag install --restore. - Migration 008 (
handoff,handoff_at) andcheckpoint handoff:freshness
inrag status. - Client detection is payload-driven; Codex behavior is unchanged. The Codex
sources were checked to confirmPostCompactcompletes before
SessionStart(source="compact")runs.
Upgrade
uv sync
uv run rag init-db
uv run rag install --check
uv run rag installThen, in Claude Code, review the six handlers with /hooks, confirm
/autocompact shows 500000 tokens from settings, and verify with
uv run rag status. Codex users: start a fresh Codex session after
rag install --codex; Codex discovers handlers once per session.
Read What’s New in 0.4.0 for the complete tour.
Verification
- 610 tests passed against PostgreSQL.
- Wheel and sdist passed
twine check. - Migration 008, the installer, and a manual
/compactwere exercised on a
real macOS deployment; the two defects that smoke exposed were fixed before
this release.