Skip to main content

session-sidekick

Stop re-explaining context you've already worked through.

A local CLI + Claude Code hook that indexes all your past sessions and surfaces relevant ones as you type - before you accidentally redo work you've already done.


The problem this solves

Claude Code sessions are ephemeral. Every time you start a new one, Claude has no memory of the three hours you spent debugging the same Modal deployment last week, or the exact vLLM flag you figured out, or how you structured that RAG pipeline.

You either:

  • Re-explain everything from scratch every session (slow)
  • Search through raw JSONL files manually (painful)
  • Forget you solved it and solve it again (expensive)

Session-sidekick fixes this with two pieces:

  1. A recall hook - fires on every prompt via UserPromptSubmit. Runs semantic search against all your past sessions. If it finds a confident match, it prints a one-line hint before Claude sees your message: You did this before - session abc12345: add modal vllm endpoint

  2. A search CLI - keyword + semantic + combined search across every session you've ever had. sidekick search "modal deployment" ranks results by relevance, not just recency.

Everything is local. No API keys. No data leaves your machine.


Install

pip install session-sidekick

Or from source:

git clone https://github.com/AravindKurapati/session-sidekick
cd session-sidekick
pip install -e .

Requirements: Python 3.11+ - no API keys needed.


Quick start

# Index your Claude Code sessions (reads ~/.claude/projects/)
sidekick reindex

# Build semantic embeddings (one-time, ~1-2 min)
sidekick embed

# Check what got indexed
sidekick stats

# Search
sidekick search "modal vllm"
sidekick search "react state management" --mode fts
sidekick list --project my-project
sidekick show abc12345 --full

Demo

Browse recent sessions across all your projects sidekick list --limit 8

Semantic search — finds relevant past work by meaning, not just keywords sidekick search "bulk insert timeout"

Drill into any session for full context; stats shows your indexed corpus sidekick show + sidekick stats


Live recall hook (the main feature)

The recall hook injects a past-session hint into your terminal at the moment you submit a prompt to Claude Code - giving you context before Claude even sees your message.

Setup:

# 1. Install the hooks into ~/.claude/settings.json
sidekick install-hooks --apply

# 2. Start the daemon (keeps the embedding model warm for fast recall)
sidekick-daemon

The daemon needs to be running for recall to work. Add it to your shell startup to keep it always-on:

# ~/.zshrc or ~/.bashrc
sidekick-daemon &>/dev/null &

How it looks:

You: fix the vllm timeout on modal

 You may have done this before - session a3f2b1c8 (2026-04-28): debug modal vllm timeout
   Set request_timeout=120 in the Modal endpoint config, not in the vLLM args.
   Tags: modal,vllm,timeout
   Resume with: claude --resume a3f2b1c8

Claude: ...

The hint only appears when the confidence score exceeds the threshold (default 0.78). Silent otherwise - it never interrupts you.


All commands

Command What it does
reindex Incrementally scan ~/.claude/projects/*.jsonl
embed Build/update semantic embeddings for unembedded turns
stats Sessions, turns, embeddings count + DB path
list Browse sessions (--project, --status, --limit)
search Keyword + semantic search (--mode fts|semantic|combined)
show Full session detail by id (--full for all turns)
install-hooks Print or apply hook config (--apply to patch settings.json)
stop-hook Run by Claude Code Stop event - reindex + embed

How it works

~/.claude/projects/**/*.jsonl
        ↓  sidekick reindex
   SQLite (WAL) + FTS5
        ↓  sidekick embed
   MiniLM embeddings (384d, ONNX, local)
        ↓  sidekick-daemon
   TCP socket server (Windows) / Unix socket (macOS/Linux)
        ↓  UserPromptSubmit hook → sidekick-recall
   Cosine similarity → hint printed if score > 0.78
  • Index: ~/.session-sidekick/index.db - SQLite with FTS5 full-text and raw float32 embeddings
  • Model: sentence-transformers/all-MiniLM-L6-v2 via fastembed (ONNX, ~80MB, downloads once)
  • Search: FTS5 keyword, cosine similarity semantic, or RRF-fused combined
  • Recall budget: 300ms timeout - silent if daemon is slow or down, never blocks Claude Code

Data & privacy

  • All data stays local at ~/.session-sidekick/
  • Only reads ~/.claude/projects/ - never writes to it
  • No network calls (the optional titler uses Anthropic's API but is disabled by default)
  • The daemon runs on localhost only

Optional: session titler

If you want auto-generated titles for sessions (requires ANTHROPIC_API_KEY):

pip install "session-sidekick[titler]"
ANTHROPIC_API_KEY=... sidekick-titler

Calls Claude Haiku (~$0.0005 per session). Titles are stored locally and shown in sidekick list.


License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

session_sidekick-0.1.1.tar.gz (150.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

session_sidekick-0.1.1-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file session_sidekick-0.1.1.tar.gz.

File metadata

  • Download URL: session_sidekick-0.1.1.tar.gz
  • Upload date:
  • Size: 150.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for session_sidekick-0.1.1.tar.gz
Algorithm Hash digest
SHA256 66d97b6018ce2105174463842beffbd1a4f4920f555aa847784439e12a7776b5
MD5 3bf68e3f9a5af1b599bf96a0d9ddfb1d
BLAKE2b-256 8c20066b19c24fef35f8166f7ce5de70a1b2087fd79150977724433003a72d1f

See more details on using hashes here.

File details

Details for the file session_sidekick-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for session_sidekick-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bab8ea6cc4a30c70b42e64650ffe0e06bc6552b22d6b58f2d11f2c53a6cc0c73
MD5 a16cbf1b19635c74a5fa1ef2386a3de2
BLAKE2b-256 5d782cb6b69dbbbbcd341c204ac9ebdf67a3b0761ec1d8f1adbab4ed006790c4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page