live on npm & PyPI
Find the coding-agent session
you half‑remember.
Threadlens indexes your local coding-agent sessions into a private SQLite cache, so a rough query finds the right session - without uploading anything. One CLI across every agent you use.
Recommended - uv fetches a compatible Python for you. Or run once with uvx threadlens.
Needs Python 3.10+ on PATH. Or run once with npx threadlens.
- No cloud
- No account
- Keyword + prefix + typo-tolerant
~/work $ threadlens search "plunk otp"
codex:019a3f7c-…b21 0.94
~/dev/billing-api · 2026-05-29 14:08
…debugging the Plunk OTP email never arriving - switched the template id and fixed the otp rate-limit window…
resume cd ~/dev/billing-api && codex resume 019a3f7c-…b21
claude:7e1d2a90-…04f 0.81
~/dev/billing-api · 2026-05-22 09:41
…wired Plunk for transactional email, then tested the one-time-password flow end to end…
resume cd ~/dev/billing-api && claude --resume 7e1d2a90-…04f
cursor:c0mp-…5a 0.62
~/dev/marketing-site · 2026-04-30 18:02
…explored an OTP component but never shipped it…
no resume source path printed instead
~/work $
Demo data. Real results group by session with cwd, timestamps, snippets, and a copyable resume command where the agent supports one.
Supported agents
One search surface over the agents you already use.
Eight built-in adapters, plus any agent that writes JSONL - added with config, not code.
Codex
Claude Code
Cursor
Pi
OMP
Amp
Droid
OpenCode
Codex, Claude Code, Pi, OMP, Droid, and OpenCode emit resume commands today. Amp and Cursor don't yet - those results print the source path and context instead. Bring your own agent with a file glob and a few field paths.
How it works
Three commands. No services to run.
-
01
Build the local cache
threadlens startdiscovers your sources and builds a disposable SQLite index. Unchanged files are skipped on later runs. -
02
Search a rough query
threadlens search "plunk otp"returns session-grouped results with snippets, cwd, and timestamps. Typos are fine. -
03
Jump back in
Copy the resume command and you're back where you left off - for agents that emit one. Others give you the source path.
Prefer a keystroke? The Raycast extension calls the same CLI - identical results, no parsing or ranking of its own. Get the extension →
Working inside an agent? Run threadlens skill to print the bundled skill, then copy that folder into your agent's skills directory - your coding agent searches its own past sessions before answering from memory.
Local-first, and honest about it
Your sessions never leave your machine.
Threadlens reads your local session stores and writes a local SQLite cache. That's the
whole data path - no cloud, no account, no upload of session content. The cache is a
plain file you can delete; threadlens refresh --reset rebuilds it from scratch.
- Raw sessions stay the source of truth. The cache is derived from your stores, never the reverse.
- Ranking is explainable. Exact → prefix → bounded typo-tolerant fallback, plus recency and project boosts. No black-box model.
- Secrets are skipped. Only user and assistant text is indexed; obvious credential fields are dropped.
Stop hunting through eight history panels.
Install once, then search everything from one prompt.
Prefer npm? npm install -g threadlens