Background
- Coding agents (AI coding assistants like Claude Code, Cursor, or Copilot) don't retain memory between sessions — each new conversation starts blank. This means they repeatedly fail in the same ways, unable to learn from past mistakes or discoveries.
- "Ctx" is a new open-source Rust tool that indexes all those stored agent transcripts into a local SQLite database, then lets you search them with ranked text matching, fully offline.
- The key insight: AI coding tools already save full logs of every session on your machine. Ctx simply makes those logs queryable, so you (or your agent) can ask "has this problem come up before?" before wasting time debugging known issues.
- A concrete example: a test runner kept failing due to disk space. Without history, the agent assumed it was a code regression and wasted time debugging. With ctx, it found the previous fix (run the cleanup script) instantly.
- Beyond debugging, ctx can generate clean session transcripts to attach to pull requests, showing provenance for changes. It can also be used to audit past agent sessions to identify where a team's development流程 is inefficient — a self-improvement loop for AI-assisted coding.