DEV Community

massiron
massiron

Posted on • Originally published at deepstrain.dev

Stop pasting context every AI session: one command restores everything

The problem

Every AI coding session starts the same: paste the README, paste the architecture doc, paste the last error message, re-explain where you left off. If you switch between Claude Code, Cursor, and Gemini in the same project, every tool starts from zero.

nodestone fixes that. It's a project-level memory engine for AI-assisted development, and it's free.


What it does

nodestone tracks four things across sessions:

  • Decisions — why you chose SQLite over Postgres, or that weird middleware pattern
  • Tasks — what's done, what's next, with dependencies and critical path
  • Drift — when you start implementing something different from what you planned
  • Context — a compressed ~500 token pack that any AI can restore in one command

Install

pip install nodestone
Enter fullscreen mode Exit fullscreen mode

That's it. Python 3.10+.


Quick start

1. Initialize in your project

nodestone init
Enter fullscreen mode Exit fullscreen mode

Creates a .nodestone/ directory in your project root.

2. Save your first decision

nodestone decision add "Use SQLite instead of Postgres" --context "Only 3 users, no need for a server" --impact "Simpler deployment, no Docker needed"
Enter fullscreen mode Exit fullscreen mode

3. Add a task

nodestone task add "Add user authentication" --depends "Set up database schema" --effort 4h
Enter fullscreen mode Exit fullscreen mode

4. Snapshot context for the next session

nodestone pack
Enter fullscreen mode Exit fullscreen mode

Prints a ~500 token context block. Copy it, paste it at the start of your next AI session. Done.

5. Restore on the other side

nodestone restore <fingerprint>
Enter fullscreen mode Exit fullscreen mode

The other agent picks up exactly where you left off — decisions, tasks, file state, everything.


Real example: cross-agent handoff

# Session 1 — Claude Code
$ nodestone decision add "Use FastAPI over Flask" --context "Need async support for WebSockets"
$ nodestone task add "Build WebSocket handler" --effort 3h
$ nodestone pack
> Context fingerprint: ns_X7k2m9 (copied to clipboard)

# Session 2 — Cursor (next day)
$ nodestone restore ns_X7k2m9
> Restored: 3 decisions, 4 tasks, 2 file changes
Enter fullscreen mode Exit fullscreen mode

No pastebin, no markdown file, no "as I mentioned yesterday...".


A note on trade-offs

  • Works best with pack + restore flow. Real-time sync across agents is on the roadmap but not here yet.
  • The scheduler (OR-Tools CP-SAT) is powerful but overkill for hobby projects — you can ignore it entirely.
  • It's new. Documentation is good but the community is small. That said, the core loop (decisions + tasks + pack/restore) is solid.

What's next

  • Fingerprint handoff (done): zero-loss context transfer
  • Drift detection (done): alerts when implementation diverges from plan
  • Plugins/triggers (done): webhooks, MCP tools, CLI hooks on state changes
  • Real-time sync (next): multiple agents sharing context live

Links

If you're switching between AI tools on the same project, give it a try. Feedback and PRs welcome.

Top comments (0)