Show HN: ctx – Search the coding agent history already on your machine
The short version
- But you do have months of full-fidelity agent transcripts stored on your machine.
- A simple solution that goes a long way: ingest those transcripts and logs into a structured SQLite database, then search them with ranked text match.
- Everything is fully local and doesn't require anything fancy like a graph database or hosted memory service.
- This is the idea behind ctx, a Rust CLI that handles the ingestion and searching.
- We give our agents a skill that tells them to reference past sessions before working in an area.
The story
Coding agents don't have long-term memory.
But you do have months of full-fidelity agent transcripts stored on your machine.
A simple solution that goes a long way: ingest those transcripts and logs into a structured SQLite database, then search them with ranked text match. Everything is fully local and doesn't require anything fancy like a graph database or hosted memory service.
This is the idea behind ctx, a Rust CLI that handles the ingestion and searching.
We give our agents a skill that tells them to reference past sessions before working in an area. Usually we do this through an "Agent History Research Subagent" whose job is just to prepare a short brief covering any relevant history before the task begins.
A real example: sometimes our test suite runs would fail because disk was full on the runner. The correct approach was to run the cleanup runbook, but the root cause of the failure was not clear to the agents, so they would think it was a test regression and go down the wrong rabbit hole debugging. When the agent searched history, it realized this failure had been encountered before and found the right workaround immediately. That got the agent onto the right cleanup path, and later we improved the log output so the same failure would be clearer next time. It's a boring story, but it's real agent productivity.
Another nice use case is quickly generating session transcripts for sharing. You can exclude the noisy intermediate messages, so the transcript shows the important parts of the session more cleanly. Try attaching a session transcript to your next PR so your teammate and their agent can review the provenance and prompting behind the change.
If you're up for an additional challenge, ask your agent to "exhaustively review all agent history in this repo and find where the SDLC is struggling or isn't agent-native". Using past sessions to recursively improve the agentic SDLC is a loop that we're using a lot today.
If you try it out, please let us know what you think!
Comments URL: https://news.ycombinator.com/item?id=48763462
Points: 20
# Comments: 4
How other outlets covered this
Compare allAlto found this story at 4 outlets. Same event, different framing — compare the headlines.
- VentureBeatBlock’s new Apache 2.0 agent workspace Berd works across models and harnesses, stores conversation history locally10 days ago
- ZeroHedgeDeep Capture: The Administrative State's Intellectual Origins11 days ago
- Hacker NewsShow HN: ctx – Search the coding agent history already on your machineabout 2 months ago
- APTrump’s deportation agenda is about to get a $70B infusion from Congress3 months ago
How this story developed
Full timelineAlto has tracked this across 15 days of coverage from 4 outlets.
Powered by Gab AI
The Story At A Glance
Reading this article now — analysis appears below
💡 AI analysis provides alternative perspectives on current events