ctxrs/ctx
Instant recall for coding agents. Search the history already on your machine. Git blame, but for agent sessions.
What it solves
Coding agents often leave behind verbose log files containing decisions, assumptions, and failed attempts that are difficult for both humans and agents to search and retrieve. ctx provides a fast, local way to index and search these transcripts to prevent repeated work, reduce token spend, and recover historical context that is not present in the final code.
How it works
ctx scans local agent history files (such as JSONL or SQLite databases) from various providers like Claude Code, Cursor, and OpenHands. It converts these into consistent local records and indexes them using Tantivy for high-performance lexical search. It also supports local semantic search via embeddings. The "ctx pro" add-on allows users to map specific lines of code, commits, or PRs back to the original agent session that produced them, similar to a git blame for agent sessions.
Who it’s for
Developers using AI coding agents who want to maintain a long-term, non-lossy memory of their agent's work across different sessions and tools.
Highlights
- Broad Agent Support: Supports a wide array of agent harnesses including Claude Code, Cursor, Codex, and many others.
- Local-First Privacy: All indexing and search run locally; prompts and transcripts are not sent to cloud services.
- High Efficiency: Uses Tantivy for indexing, making it significantly faster than traditional database ingestions and more token-efficient than raw transcript search.
- Provenance Tracking: The pro version enables attribution of code changes to specific agent sessions via
ctx blame. - Hybrid Search: Combines BM25 lexical matching with local semantic search for more flexible retrieval.
Related
- Dispatch
- Project
- Project
- Project
- Dispatch