Related: several months ago I made a TUI session search/manager tool as part of my suite of Claude/codex productivity tools:
https://pchalasani.github.io/claude-code-tools/tools/aichat/...
There’s Rust/Tantivy-based search and a whole host of utilities to view, resume, trim (to clean up context when close to limit), port to Claude/codex, move accounts, etc.
The search has a json mode for agents, and a corresponding skill so you can just ask Claude/codex to search for the “latest session where I worked on xyz”.