Claude Code auto memory, CLAUDE.md, Copilot Memory and threadctx compared

Four ways coding agents remember a repository: what each stores, where it lives, who shares it, how it expires, and whether anything checks it against the code.

Updated 2026-12-02

Coding agents now remember in several ways, and the differences matter more than the feature names. The questions worth asking of any agent memory: who writes it, who else gets it, what it costs per session, when it expires, and what happens when it is no longer true.

CLAUDE.mdClaude Code auto memoryGitHub Copilot Memorythreadctx memory
Written byYouClaudeCopilotThe agent (memory_write) or you (CLI)
Lives inThe repository (or your home directory)~/.claude/projects/<project>/memory/ on your machineGitHubPersonal: ~/.threadctx/local.json. Team: .threadctx/memory.json in the repository
Shared with the teamThrough gitNo; machine-localRepository facts are shared with collaboratorsTeam notes through git, reviewed in pull requests
LoadedIn full at every session startFirst 200 lines or 25 KB of MEMORY.md at session start; topic files on demandWhen Copilot finds a relevant factOnly when the agent queries; only matching notes
Checked against the codeNoNo; documented as context, not enforcedCopilot checks a fact’s citations against the current branch; GitHub describes this as Copilot’s judgment, not a guaranteeEvery recall: files, scripts, commands, package manager, runtime versions and secrets, checked deterministically
ExpiryNoneNone documented90 days by default, adjustable by organisation ownersOptional per note; flagged for review after 90 days; superseded notes hidden
Works withClaude CodeClaude CodeCopilot surfaces (CLI, code review, cloud agent and others)Claude Code, Cursor, VS Code, Codex, Gemini CLI, any MCP client

Sources, checked on 2026-12-02: code.claude.com/docs/en/memory and docs.github.com/en/copilot/concepts/agents/copilot-memory. Features change; check the current documentation before relying on a detail.

When to use which

  • CLAUDE.md or AGENTS.md: rules every task needs. Keep them short, because every session pays for them.
  • Claude Code auto memory: your personal preferences on your machine.
  • Copilot Memory: if your team works in Copilot's own surfaces, it remembers repository facts there with citations.
  • threadctx: repository knowledge that should reach every teammate and every agent, stay reviewable in pull requests, and be checked against the code each time it is used.

They are not exclusive. A common setup is a short AGENTS.md, auto memory left on for preferences, and team facts in threadctx so they work in Claude Code, Cursor and VS Code alike.

Why checking matters

A memory is an instruction the agent will follow later, written by an agent, often without review. If it names a file that was deleted, or tells the agent to use npm in a pnpm repository, the agent acts on it. threadctx treats memory like any other agent instruction: it is checked for dead paths, undefined scripts, a changed package manager, secrets and download-and-run commands before the agent sees it, and the agent is told what failed.

npx threadctx setup

Questions

Can I use threadctx and Claude Code auto memory together?

Yes. They store different things in different places. Auto memory keeps your preferences on your machine; threadctx keeps repository knowledge, shared through git and checked against the code.

Does threadctx replace CLAUDE.md?

No. CLAUDE.md is for rules every task needs. threadctx keeps situational knowledge out of it, which makes CLAUDE.md shorter, and also grades CLAUDE.md and AGENTS.md for problems.

Does threadctx send my memory anywhere?

No. It runs locally. Personal notes stay on your machine and team notes in your repository.

Set it up now.

Free, local, nothing uploaded.

npx threadctx setup

Cursor or VS Code? The same memory as an MCP server: