🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
Git Notes for coding agent conversations
Shift Log attaches agent conversations to commits using standard Git Notes. After `shiftlog init`, it wires in hooks for supported agents so conversations are saved, searchable, resumable, and synced with the repo.
Builders who want their agent sessions recorded alongside commits and available later for search or replay.
You can recover the conversation that led to a commit instead of guessing how it happened.
What it does
Save conversations to Git Notes
Stores chat history on commits under `refs/notes/shiftlog` so `git log` stays clean.
Agent-specific hooks
Connects with Claude Code, Codex CLI, Copilot CLI, Gemini CLI, and OpenCode through their hook or plugin systems.
Search and list history
`shiftlog list` and `shiftlog search` let you find past conversations by text or metadata.
Resume from a commit
`shiftlog resume <commit>` restarts a session from a specific commit or ref.
Sync across clones and rebases
`shiftlog sync push/pull` moves notes with the repo, and `shiftlog remap` handles GitHub rebase-and-merge cases.
Browser viewer
`shiftlog serve` starts a web view for browsing stored conversations.
How to get it
- 1Run
curl -fsSL https://raw.githubusercontent.com/re-cinq/shift-log/master/scripts/install.sh | bash
- 2Run
# ...In a Git repo shiftlog init --agent=<agent>
- 3See what conversations you have
shiftlog list
- 4Search through past conversations
shiftlog search "authentication" # Text search shiftlog search --agent claude --branch main # Filter by metadata shiftlog search "jwt" --regex --context 2 # Regex with context lines
- 5Get a quick summary of a conversation
shiftlog summarise # Summarise HEAD conversation shiftlog tldr HEAD~1 # Alias, works the same way shiftlog tldr --focus="security" # Prioritise security-related changes
- 6Resume a past session
shiftlog resume abc123 # By commit SHA shiftlog resume HEAD~3 # By git ref
README
Shift Log
Save, view, and search coding agent conversation history, persisted as Git Notes.
Install
curl -fsSL https://raw.githubusercontent.com/re-cinq/shift-log/master/scripts/install.sh | bash
# ...In a Git repo
shiftlog init --agent=<agent>
Where <agent> is claude (default), codex, copilot, gemini, or opencode.
Now work with your coding agent as you would normally. Whenever you or the agent commit, the conversation since the last commit will be attached to that commit as a Git Note.
Supported Agents
| Agent | Init command | How it hooks in |
|---|---|---|
| Claude Code | shiftlog init (default) | .claude/settings.json hooks |
| Codex CLI | shiftlog init --agent=codex | Post-commit git hook |
| Copilot CLI | shiftlog init --agent=copilot | .github/hooks/shiftlog.json hook |
| Gemini CLI | shiftlog init --agent=gemini | .gemini/settings.json hooks |
| OpenCode | shiftlog init --agent=opencode | .opencode/plugins/shiftlog.js plugin |
Usage
See what conversations you have:
shiftlog list
Search through past conversations:
shiftlog search "authentication" # Text search
shiftlog search --agent claude --branch main # Filter by metadata
shiftlog search "jwt" --regex --context 2 # Regex with context lines
Get a quick summary of a conversation:
shiftlog summarise # Summarise HEAD conversation
shiftlog tldr HEAD~1 # Alias, works the same way
shiftlog tldr --focus="security" # Prioritise security-related changes
Resume a past session:
shiftlog resume abc123 # By commit SHA
shiftlog resume HEAD~3 # By git ref
View in your browser:
shiftlog serve
Pull down conversations from a repo you cloned:
shiftlog sync pull
shiftlog vs Entire
| Entire | shiftlog | |
|---|---|---|
| Funding | $60M seed round | Claude Code Max plan ($200/mo) |
| Staffing | 12 engineers | An imbecile spec-driving while not really paying attention |
| Agents | Claude Code, Gemini CLI | Claude Code, Codex CLI, Copilot CLI, Gemini CLI, OpenCode |
| Storage | Custom checkpoints format | Standard Git Notes |
| Resume sessions | No | Yes |
| Web viewer | No | Yes |
| Rebase support | No | Yes |
| Open source | Yes | Yes |
Why?
In order to understand how and why a commit was made, we need to see the conversation that led to it.
How It Works
Shiftlog uses Git Notes to attach conversations to commits, stored under refs/notes/shiftlog to keep git log clean. When you run shiftlog init, it sets up hooks so:
- When the coding agent makes a commit, the conversation is saved automatically
- When you make a commit during an agent session, it's saved too
- When you push/pull, conversations sync with the remote
No extra steps needed during your normal workflow.
To view notes directly with git: git log --notes=shiftlog
Commands
| Command | Description |
|---|---|
shiftlog init | Initialize shiftlog in the current repo |
shiftlog list | List commits with stored conversations |
shiftlog search [query] | Search through stored conversations |
shiftlog show [ref] | Show conversation history for a commit |
shiftlog summarise [ref] | Summarise a conversation using your coding agent |
shiftlog resume <commit> | Resume a coding agent session from a commit |
shiftlog serve | Start the web visualization server |
shiftlog doctor | Diagnose shiftlog configuration issues |
shiftlog debug | Toggle debug logging |
shiftlog sync push/pull | Sync conversation notes with remote |
shiftlog remap | Remap orphaned notes to rebased commits |
Requirements
- Git
- One of the supported coding agents (Claude Code, Codex CLI, Copilot CLI, Gemini CLI, or OpenCode)
Multi-Developer Sync
When multiple developers use shiftlog on the same repository, each person's conversation notes are synced automatically via git push/pull hooks. Notes from different developers are merged seamlessly because they typically annotate different commits.
If the remote notes ref has diverged (e.g. two developers pushed notes without pulling first), shiftlog sync push will reject the push and advise you to pull first:
shiftlog sync pull # Fetches and merges remote notes
shiftlog sync push # Now succeeds
In the rare case where two developers annotate the exact same commit SHA, both notes are preserved by concatenation — no data is lost.
Git Worktrees
Shiftlog is worktree-safe. If you use git worktree to work on multiple branches simultaneously, each worktree sees only the conversations for commits on its own branch. Hooks are shared across worktrees (as git requires), but shiftlog list and shiftlog show are scoped to the current HEAD.
Local Rebase
Conversation notes automatically follow commits when you rebase. During shiftlog init, the notes.rewriteRef git config is set to refs/notes/shiftlog, which tells git to remap notes to the new commit SHAs during rebase. No manual steps are needed.
If you initialized before this config was added, run shiftlog init again or set it manually:
git config notes.rewriteRef refs/notes/shiftlog
You can verify the config is set with shiftlog doctor.
GitHub Rebase Merge
When a PR is merged via GitHub's "Rebase and merge" strategy, the commits get new SHAs on the target branch. Since this happens server-side, git's notes.rewriteRef does not apply and notes remain keyed to the original (now-orphaned) commit SHAs.
Shiftlog handles this automatically. After you pull a rebase-merged PR, the post-merge hook runs shiftlog remap, which:
- Finds notes on commits that are no longer on any branch (orphaned)
- Uses
git patch-idto match each orphaned commit to its rebased counterpart by diff content - Copies the note to the new commit SHA (the original note is also kept)
For this to work, the local feature branch must be deleted or pruned so the old commits become orphaned. If your GitHub repo is configured to auto-delete branches after merge, this happens naturally when you git pull with fetch.prune=true (or git fetch --prune). Otherwise, delete the branch manually first:
git branch -D feature-branch
shiftlog remap
You can also run shiftlog remap at any time — it reports how many notes were remapped and how many remain unmatched. Unmatched notes are left in place, not deleted.
Note: Remap works with GitHub's "Rebase and merge" strategy. It does not support "Squash and merge", which combines all commits into one new commit with no 1:1 mapping to copy notes from.
License
Files in the repo
- .beads
- .claude
- .devcontainer
- .github
- cmd
- docs
- internal
- openspec
- scripts
- tests
- .actrc
- .gitattributes
- .gitignore
- .golangci.yml
- .goreleaser.yml
- AGENTS.md
- CLAUDE.md
- go.mod
- go.sum
- LICENSE
- main.go
- Makefile
- PLAN.md
- README.md
- todo.txt
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More tools
The best-benchmarked open-source AI memory system. And it's free.
Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.