backfill: keep every Claude Code and Codex session in your project
backfill keeps every Claude Code and Codex session of a project in the project itself. Install it once per computer; from then on each session you start, in any repository, is saved to that repository’s .claude-logs/ or .codex-logs/ folder.
Get backfill on PyPI Get backfill on Homebrew
Install
pipx install backfill # or: uv tool install backfill
brew install focsd/tap/backfill # Homebrew alternative
backfill install # once per computer: hooks into Claude Code and Codex
backfill doctor # everything green? you are done
Restart open Claude Code or Codex sessions. Upgrade with pipx upgrade backfill or brew upgrade backfill, then run backfill install once more.
What it does
- Readable history: every prompt, answer and tool call as Markdown, plus the raw transcript, an event journal and one summary per turn.
- Search and recap:
backfill search,backfill show,backfill digestandbackfill recapbring yesterday’s work into a new session. - Presets:
minimal,standardoreverything, with a monthly layout, tool filters and a history cap per project. - Housekeeping:
backfill cleanshows what would be removed before it removes anything;backfill doctorchecks the setup.
Private by design
- Nothing leaves your machine: no account, no telemetry, no network access.
- Secrets are stripped from the logs by default.
- Log folders ignore themselves in git, so they are never committed by accident.
- Hooks never fail or block an agent session.
- Written with the Python standard library only.
backfill uninstallremoves the hooks and leaves your logs.
Requirements
Python 3.11 or later, and Claude Code, Codex or both.
Availability
Version 0.3.0 is on PyPI and in the Homebrew tap. Questions are welcome at .