Skip to main content
The --claude-memory flag enables Anthropicโ€™s native memory tool for Claude models, allowing the agent to store and retrieve information across conversations.

Quick Start

Claude Memory Stores Preferences

Usage

Basic Usage

Expected Output:

Combine with Other Flags

Requirements

Claude Memory Tool requires an Anthropic model. It will not work with other providers.

How It Works

  1. Enable: The --claude-memory flag activates Anthropicโ€™s native memory tool
  2. Store: Claude can store information using the memory tool
  3. Retrieve: Claude can retrieve stored information in future conversations
  4. Persist: Memory persists across conversation sessions

Comparison with Other Memory Options

Examples

Research Task

Learning Session

Project Context

Programmatic Usage

Best Practices

Use Claude Memory Tool for tasks where you want Claude to decide what to remember.
Claude Memory Tool data is stored on Anthropicโ€™s servers. For sensitive data, use local --memory instead.