# CLAUDE_CODE_DISABLE_AUTO_MEMORY

> Set to 1, it turns auto memory off. Set to 0, it forces it on.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_DISABLE_AUTO_MEMORY=1

## Think of it like

It is like you ask a helper not to keep a diary.

## Definition

CLAUDE_CODE_DISABLE_AUTO_MEMORY set to 1 turns auto memory off. Claude then does not write or read the notes it keeps for itself. Set it to 0 to force auto memory on, even in bare mode or when a setting turns it off. Your own CLAUDE.md files still load.

## Example

Jack shares a laptop for demos and does not want notes piling up. He sets this, and Claude keeps no memory between demos.

## Example code

```bash
export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1
claude
```

Keep Claude from saving its own notes.

## Why it matters

It lets you choose if Claude learns from past sessions, or starts fresh each time.

## Common mistake

Expecting it to drop CLAUDE.md too. It only stops auto memory. Your own files still load.

## Three principles

- **1 turns it off.** No notes.
- **0 forces it on.** Even in bare mode.
- **CLAUDE.md stays.** Only auto memory goes.

## Related terms

- [Auto Memory](https://learn.benibix.com/term/ai/auto-memory)
- [CLAUDE_CODE_DISABLE_CLAUDE_MDS](https://learn.benibix.com/term/ai/claude-code-disable-claude-mds-variable)
- [Bare Mode](https://learn.benibix.com/term/ai/bare-mode)

## Told apart from

- [CLAUDE_CODE_DISABLE_CLAUDE_MDS vs CLAUDE_CODE_DISABLE_AUTO_MEMORY](https://learn.benibix.com/compare/claude-code-disable-claude-mds-variable-vs-claude-code-disable-auto-memory-variable): People think turning off auto memory drops CLAUDE.md too. It does not. The auto memory switch stops only the notes Claude keeps for itself. Your own CLAUDE.md files still load. The CLAUDE_MDS switch drops every memory file, yours and the auto ones. Use the first to stop Claude learning. Use the second for a clean test with no notes.

![Which memory files load into the chat under each variable, from CLAUDE.md to auto memory.](https://learn.benibix.com/diagrams/env-memory-load.svg)

---

Source: https://learn.benibix.com/term/ai/claude-code-disable-auto-memory-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
