Skip to content

[FEATURE] Global/shared memory across projects #36561

@jiazhizhuo

Description

@jiazhizhuo

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


Originally submitted via Claude Code feedback tool

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions