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 lose track of their own past work because session logs are scattered and difficult to query. This tool solves the problem of "agent amnesia" by making your existing history searchable and providing a way to trace code back to the specific agent sessions that created it.

How it works

It is a local CLI toolchain that indexes your existing agent logs (such as those from Claude Code, Cursor, or Codex) without modifying them. It uses the Tantivy search engine for fast, parallel indexing and offers a Rust-based graph tool to map codebase relationships. It also includes a "sift" feature to automatically prune noisy tool output, saving tokens during agent interactions.

Who it’s for

This tool is designed for developers who use AI coding agents and want to improve their efficiency by giving agents instant recall of past decisions, constraints, and failed experiments without relying on lossy memory summaries.

Highlights

  • Agent History Search: Instantly search through months of past agent transcripts and tool calls.
  • Code Blame: Trace specific lines of code back to the exact agent session that wrote them, including citations.
  • Codebase Mapping: A high-performance, Rust-based graph tool that maps dependencies and relationships across your project.
  • Token Efficiency: Reduces token usage by pruning noisy tool output and providing ranked, cited search results.
  • Privacy-First: All indexing, searching, and graph generation happen locally on your machine.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project