DEV Community

Sriram
Sriram

Posted on

How I built a lightweight background cache to stop ChatGPT and Claude from forgetting my project context

If you use AI coding assistants across multiple platforms (like jumping between Claude and ChatGPT), you’ve probably hit the "Empty Room" problem.

Every time you start a fresh chat session, the model has zero context about your database schema, your environment setup, or the architectural decisions you locked down yesterday. I got completely burnt out spending the first 10 minutes of every coding session pasting in massive context blocks.

So, I decided to build a lightweight experiment to solve it: NICO (Neural Information Cache Object).

The Architecture
The goal was to keep latency near zero without managing heavy persistent infrastructure.

The Logic: An asynchronous background extraction layer that parses finalized chat decisions into structured JSON objects.

The Stack: Built using Next.js and deployed on serverless edge infrastructure with a fast key-value backing store to instantly retrieve and inject state back into active sessions.

Why I'm Sharing This
Right now, I'm running a simple validation test to see if other engineers actually struggle with this cross-model memory gap before building out the full browser extension client.

If you deal with this same LLM amnesia, you can check out the rough MVP landing page and early developer list here: nico.aimrrs.in

How do you currently handle context management when switching between different AI models? Would love to hear your thoughts or critique on the edge-caching approach in the comments!

Top comments (7)

Collapse
 
paul_irolla_6b5ae261d0224 profile image
Paul Irolla •

Caching the context is the cheap half. What costs is what gets loaded into each call: if the whole project goes back in on every request, those tokens are billed again each time. I would check how often it loads before anything else.

Collapse
 
aimrrs profile image
Sriram •

Spot on. That is the exact bottleneck, if you dump raw text into every prompt, you burn tokens fast. NICO is designed to only push a compressed, delta-updated summary rather than raw history, but token economy is definitely the hardest design constraint here.

Collapse
 
liorbuilds profile image
Lior •

The low-tech version is one plain text file per project with three short parts: what the project is, decisions with the reason, and where you stopped. Coding agents can read it straight from the folder, and for a chat app you paste it at the start. It's manual, but it keeps you in charge of what's true, which matters when an automatic extractor picks up a decision that was reversed later. Keeping it under a page also helps with the cost paul_irolla mentions, since it gets loaded every time.

Collapse
 
aimrrs profile image
Sriram •

Totally agree that a simple markdown file in the repo is the cleanest source of truth right now. The main friction NICO is trying to solve is automating the manual updates so you don't have to keep rewriting the PROJECT.md file after every session. But the 'truth drift' point on automatic extractors is a massive challenge.

Collapse
 
liorbuilds profile image
Lior •

One middle ground that has worked for me: let the tool propose the update at the end of a session, as a short diff to the file, and keep a person's yes before it lands. You save the rewriting, and a reversed decision gets caught in that ten-second review instead of quietly becoming the new truth.

Thread Thread
 
aimrrs profile image
Sriram •

That 'human-in-the-loop diff review' is a fantastic middle ground. Automating the draft generation saves the friction of writing it manually, but keeping a quick 1-click approval step completely eliminates the risk of silent truth drift. Definitely incorporating that pattern!

Collapse
 
aimrrs profile image
Sriram •