HeadlinesBriefing favicon HeadlinesBriefing.com

Local AI Agent History Search with ctx CLI

Hacker News •
×

Developers struggling with stateless coding agents can now tap their own logs. The open‑source tool ctx ingests months of agent transcripts, normalizes them, and stores the data in a local SQLite index. Written in Rust, it runs as a lightweight CLI, requiring no cloud service or graph database.

By converting raw logs into searchable sessions, events, and file metadata, ctx reduces token usage dramatically compared to naïve transcript scans. Users can query by keyword, file path, or combine multiple terms, receiving ranked snippets and IDs that let agents cite exact prior discussions. The index stays on the machine, preserving privacy.

Beyond debugging—such as quickly surfacing a previous disk‑full failure—the tool helps generate clean session summaries for PR attachments or guides agents to review historic bottlenecks in a repo. Its design encourages a feedback loop where past agent work continuously informs future automation, making the development workflow more efficient.