[FEATURE] Global/shared memory across projects

Resolved 💬 3 comments Opened Mar 20, 2026 by jiazhizhuo Closed Mar 24, 2026

Summary

Currently, Claude Code's memory is project-scoped only. Memory files are stored at:
~/.claude/projects/<encoded-git-root>/memory/

This means memory created in one project is not accessible in other projects. Users who want to share common patterns, preferences, or debugging insights across projects must manually duplicate content into each project's CLAUDE.md.

Use Cases

  1. Cross-project developer preferences: Coding style preferences, commonly used commands, debug patterns that apply across all projects
  2. Team-shared knowledge: Architecture decisions, coding standards, onboarding notes that should be available to all projects
  3. Personal efficiency: Remembering "always use bun instead of npm" without needing to configure it per project

Proposed Solution

A global memory layer that persists across all projects:

  1. Global memory file: ~/.claude/memory/ or similar location
  2. Project memory: Current ~/.claude/projects/<project>/memory/
  3. Search order: Project memory → Global memory (project overrides global)

Alternatively, a memoryDirectory setting in settings.json that supports:

  • .claude/memory (relative → repo-local)
  • ~/.claude/shared_memory (absolute → global shared)

Workaround

Currently users must maintain separate .md files or manually copy content between projects. This is error-prone and doesn't scale.

References

  • Issue #28276 requests repo-local memory (similar but scoped to single repo)
  • This is a complementary request for true cross-project/global memory

---

Originally submitted via Claude Code feedback tool

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗