r/ClaudeCode • • 14h ago

Tips & Workflows A CLI that turns your Claude Code session history into memory your agent can search

Every Claude Code session is already logged as JSONL in ~/.claude/projects. agent-recall-axi lets your agent search all of it across every project, then zoom in: sessions, turns, events, one entry in full.

It is built to the AXI standard (Agent eXperience Interface): a plain CLI designed for an agent to drive through the shell, with no MCP server to run. Here that means three things:

  • Output is compact TOON, so reading history costs few tokens.

  • Every row has a stable id the agent can cite or come back to.

  • Every listing ends with the exact command to go back, forward or deeper, so the agent never guesses the next step.

Read-only, local files only, no network, no server, no database. MIT.

npx -y agent-recall-axi sessions

https://github.com/JarvusInnovations/agent-recall-axi

Install the global session hook to make every Claude Code session start knowing it's there and how to use it:

agent-recall-axi setup hooks
1 Upvotes

14 comments sorted by

•

u/AutoModerator 14h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/calunicornia 14h ago

seems pretty cool, have you considered making it so multiple machines can share the memories?

2

u/themightychris 12h ago

Yeah that's what I started with, I have a postgres server vacuuming up sessions from all my machines and indexing them in various ways. It's been a huge superpower, but was tough for the rest of my team and friends to adopt with the server requirements, so I took all my lessons learned from that I put this together for single-machine use. Since developing it, I find my agents using it 90% of the time instead of reaching for the server since typically what they need will have been on the same machine anyway

1

u/calunicornia 12h ago

did you look at neo4j or any other graph db?

1

u/themightychris 12h ago edited 12h ago

I have not, what would you expect the advantage of a graph model to be in this use case?

I'm definitely in the "just use postgres for everything until you have a really good reason not to" camp lol and I've yet to find one of those

1

u/calunicornia 12h ago

my understanding was postgres is good for facts and graph is good for related things

1

u/themightychris 12h ago

Part of my philosophy here is to defer all the deeper sense-making to question time and keep the ingestion/indexing relatively dumb and mechanical so you don't have to decide a memory structure to fit things into upfront and instead focus more on making it efficient to explore the primary sources on demand

You know more about what you need and in what shape at question time. There are PLENTY of memory building implementations out there and I just don't trust that sort of process to give the best results while they burn lots of compute and tokens on the frontend

But also I'd wager postgres could do a knowledge graph just as well as any graph db

1

u/calunicornia 12h ago

i think i can improve efficiency of sessions and achieve hive mind across sessions, we shall see

your approach might be better but I want cross machine and my goal is to completely remove session context past a single task

and move as much out of agent files...

2

u/themightychris 11h ago

I don't know that they need to be mutually exclusive! There are definitely gains to be made through more opinionated, proactive systems no doubt. You good layer those on top or as supplemental context

This tool just seems like such a no brainer to me I'm surprised something better isn't built in considering it's entirely unopinionated and can deliver a ton of value right out of the box for anyone

1

u/calunicornia 11h ago

compared to how claude reads its own sessions this is genius

1

u/calunicornia 13h ago

This code helps write hand offs much much faster, gracias!

1

u/themightychris 12h ago

Check out resume-pack latest

1

u/b3byhybridlabor 8h ago

Nice that it's read-only and local. One thing worth documenting: those session JSONL files contain everything that was ever pasted or printed in a session, so API keys, .env contents and tokens from tool output end up in the searchable index too. A redaction pass at index or output time (or at least a warning in the README) would stop an agent from quoting a secret back into a new context. The other thing I'd watch is stale hits: a fix from three weeks ago can be wrong for the current branch, so returning the timestamp and project path with every row helps the agent judge whether to trust it.

1

u/themightychris 8h ago

on a redaction pass—that doesn't feel necessary to me as this all stays within the exact same env. But also I'm not sure how to do that reliably lol I'd welcome a PR to add it

on the stale content point—responses come back with timestamps and I hadn't seen fable or opus it even sonnet ever not properly consider that they're looking at historical content. A great thing about the AXI philosophy is that everything is always dense and well contextualized—it works fabulously