Sitemap
All in AI

All in AI explores how artificial intelligence is reshaping the way we work, learn, create, parent, and live. We publish practical guides, enterprise insights, and human-centered reflections to help people understand and use AI wisely.

Member-only story

Featured

Andrej Karpathy’s Fix for LLM Memory Works on Code Too

8 min readJul 28, 2026

--

Press enter or click to view image in full size
Photo by Kevin Butz on Unsplash

Read this for free

You ask your coding agent to find every caller of a function before you touch it. It greps the repo, opens four or five files, skims through imports it doesn’t need, and hands you an answer.

Ask again tomorrow, same repo, same question. It starts from zero and does the whole crawl again.

Nothing it learned yesterday carried over.

I wrote about that exact failure in April, just not for code. “RAG, LLM Wiki, or Gbrain? How Your Agent Remembers Changes Everything” compared three ways an agent can remember: search fresh every time, compile a wiki once and keep querying it, or go further and act on what it knows.

Andrej Karpathy’s tweet was the anchor for that piece. His argument: stop treating LLMs as search engines that re-read the same documents on every question. Compile the knowledge into a structure once. Query the structure instead.

That piece was about research and note-taking.

Code has the same problem.

So I went looking for tools that treat a codebase the way Karpathy treats a research…

--

--

Yanli Liu
Yanli Liu

Written by Yanli Liu

Daytime finance practitioner based in Luxembourg, seasoned coder, and passionate about anything AI-related!

All in AI
All in AI

Published in All in AI

All in AI explores how artificial intelligence is reshaping the way we work, learn, create, parent, and live. We publish practical guides, enterprise insights, and human-centered reflections to help people understand and use AI wisely.