Skip to content
BaseThread
Back to Blog

AI memory vs shared context

Claude Code memory across sessions

How Claude Code memory works across sessions: CLAUDE.md persists, the rest is per-session and per-machine. Here is how to make context stick across a team.

May 13, 2026by BaseThread

Claude Code remembers exactly one thing reliably across sessions: your CLAUDE.md file. It reads that file at the start of every session, so whatever you put there persists. Everything else, the conversation, the reasoning it built up about your codebase, the thing you explained two prompts ago, is session state. When the session ends, that part is gone. And it is all tied to your machine.

So Claude Code has memory, but it is the memory you wrote down on purpose, not a growing understanding of your project.

What persists, and what does not

The line is clean once you see it.

  • CLAUDE.md persists. Conventions, build and test commands, architecture notes, the do-not-do list. It is a committed file, so it survives sessions and travels with the repo. This is the right home for repo-local truth.
  • The session does not persist. The chat history and the context Claude Code assembled while working are not promoted into anything durable. Start a new session and you start fresh, minus whatever is in the file.
  • It is per-machine. The state lives where you ran it. Move to a different machine and even the session continuity is gone.

This is a sensible design. A coding agent that silently hoarded memory across every project would be a mess. But it means the file is doing all the long-term work, and a single file has limits.

BaseThread, your team's AI tools finally on the same page. Get started.

Where the file stops

CLAUDE.md is the floor, not the whole picture, and the gaps are predictable.

  • It only covers one repo. Cross-team decisions, the product brief, the roadmap that lives elsewhere, none of that is in the file, so Claude Code is blind to it. Closing that gap is the point of giving Claude Code your whole project context.
  • It lags reality. Someone has to remember to edit it. Until they do, it is quietly wrong.
  • It is per-tool. A decision Claude Code helped you reach does not reach Cursor or ChatGPT. They keep their own state.
  • It drifts against other files. The moment you also have a .cursorrules or an AGENTS.md saying roughly the same thing, they disagree, which is why keeping CLAUDE.md and .cursorrules in sync by hand is a losing game.

The fix: a shared source Claude Code reads and writes

If you want context that outlives the session and reaches every tool and teammate, keep it outside the editor in a source the tools read.

That is what a shared context layer does. BaseThread keeps a curated context graph for your team, curated, not scraped, organized into layers like Company, Products, Teams, Projects, and You, with three streams: Activity for what happened, Decisions for what you settled and why, and Tasks for what is next. Claude Code connects over MCP through the local Mac app, reads the relevant slice at the start of every session, and writes activity, decisions, and tasks back as it works.

In practice that means:

  • Keep a CLAUDE.md for genuinely repo-local detail: build commands, local conventions.
  • Connect Claude Code to the shared layer for everything bigger than one repo: the brief, the owners, the cross-team decisions.
  • The decisions the team already logged are there, so Claude Code stops re-proposing settled choices.
  • A teammate's Claude Code reads the same source, so answers agree across people, not just across your own sessions.
  • When a task ships, it gets written back, so the next session, yours or theirs, starts caught up.

This is shared context for AI tools applied to Claude Code's memory. The session does not need to remember if the durable context lives where every tool can reach it.

The quick test

Start a fresh Claude Code session and ask why a piece of architecture is the way it is. If it guesses instead of citing the decision, it has the file but not the team's context.

TL;DR

Claude Code reliably remembers your CLAUDE.md across sessions and nothing else. The conversation and the understanding it built are per-session and per-machine, and the file only covers one repo and only updates when someone edits it. For context that survives the session and reaches every tool and teammate, keep it in a shared layer Claude Code reads over MCP and writes activity, decisions, and tasks back to.

Give Claude Code persistent, team-wide context over MCP. BaseThread is in closed beta.

Request access

Related reading

Frequently asked questions

Does Claude Code remember between sessions?

It reads your CLAUDE.md file every session, so anything you write there persists. The conversation itself, and the understanding Claude Code built up while working, does not carry over once the session ends. Memory beyond the file is per-session and tied to your machine.

What is CLAUDE.md?

CLAUDE.md is a Markdown file in your repo that Claude Code reads at the start of a session. It holds conventions, build commands, architecture notes, and rules. It persists because it is a committed file you maintain, not because the tool remembers.

Does Claude Code share memory with my team or my other tools?

No. Memory is per-session and per-machine. A committed CLAUDE.md is shared as a file, but the running context and the decisions you reached in a session stay local. Cursor, ChatGPT, and a teammate's Claude Code do not see them.

How do I give Claude Code persistent, team-wide context?

Keep the durable context in a shared source outside the tool and connect Claude Code to it over MCP. It reads the project, decisions, and recent activity every session, and writes new activity and decisions back so the record stays current.

Get your team's AI tools on the same page

BaseThread is the shared context-graph that Claude Code, Cursor, and every AI tool your team uses can read, so no one re-explains the same context twice.

Request access