# Your AI coding agent forgets everything between sessions. Here's how to fix that.

> Source: <https://dev.to/massiron/your-ai-coding-agent-forgets-everything-between-sessions-heres-how-to-fix-that-2cja>
> Published: 2026-06-13 07:54:01+00:00

You spend 20 minutes rebuilding context every time you open a new Claude Code or Cursor session. The architecture decision from last week? Gone. The task you were halfway through? Lost. The rationale behind that weird `except: pass`

you left as a TODO? Your future self will curse past you.

I built **nodestone** — a project context memory engine that lives alongside your repo. It remembers decisions, tasks, and architecture drift across AI sessions, regardless of which agent you're using. One command, and your agent picks up exactly where it left off.

Install:

```
pip install nodestone
```

Start a session:

```
nodestone start "Refactor auth middleware to use JWT"
```

nodestone creates a compressed context pack (~500 tokens) that captures: active tasks, recent decisions, detected drift between plan and code, and milestone status. Your agent receives this as system context on the next session. Full files stay on disk — only the signal travels.

Say you planned a three-phase refactor but your teammate hotfixed a core module mid-stream. You won't notice until CI breaks. nodestone's drift detection compares actual file changes against your plan:

```
nodestone plan check
# Output: DRIFT DETECTED: src/auth/jwt.py modified outside planned scope
#         Expected: src/auth/middleware.py, tests/test_auth.py
#         Actual:   src/auth/jwt.py (unplanned), src/auth/middleware.py
```

It flags the mismatch before you waste hours debugging.

`nodestone context`

command in your session starter.Git tells you *what* changed. nodestone tells you *why* you changed it, *what you were about to do next*, and *whether reality matches the plan*. They complement each other — commit messages record history, nodestone maintains forward context.

ChatGPT memory is per-chatbot. nodestone is per-project. It works across Claude, Cursor, Gemini, and any future agent. Your context follows the repo, not the chat window.

**nodestone is free and open-source.** `pip install nodestone`

— check it out at [deepstrain.dev](https://deepstrain.dev) or the [GitHub repo](https://github.com/massiron/nodestone).

I'd love to hear what's missing for your workflow. What would make context persistence actually work for your team?
