Auto-memory snapshot
bash "${CLAUDE_PLUGIN_ROOT}/skills/stateless/scripts/scope-report.sh" || echo "(snapshot unavailable — run the scope-report script manually)"
Stateless
Inspect and disable Claude Code auto memory, the store Claude writes for itself, one
directory per repo (~/.claude/projects/<project>/memory/, relocatable via
autoMemoryDirectory). Governs auto-memory only. Not in scope: CLAUDE.md / CLAUDE.local.md /
.claude/rules/ (use /claude-memory:audit), transcripts, history, or shell snapshots. For the
official full per-project wipe, use claude project purge. What it does and does not delete is
quoted verbatim in
reference/official-guidance.md; the deletion plan and flags live
in the claude-directory doc.
Criteria and exact doc quotes live in reference/official-guidance.md;
re-fetch the source pages listed there if a fact is load-bearing before you act.
Scope
| Entity |
Location |
This skill |
| Auto-memory store |
~/.claude/projects/<project>/memory/ (or autoMemoryDirectory) |
Yes. Status / disable / purge |
autoMemoryEnabled setting |
any settings scope |
Yes. Reads and writes |
CLAUDE_CODE_DISABLE_AUTO_MEMORY |
OS env or settings env block |
Yes. Reads and writes |
CLAUDE.md / .claude/rules/ |
repo + user |
No. Use /claude-memory:audit |
| CLAUDE.local.md |
repo only, no user-scope equivalent |
No. Use /claude-memory:audit |
| Transcripts |
~/.claude/projects/<project>/ |
No. Auto-cleaned by cleanupPeriodDays; claude project purge deletes this project's now |
| Prompt history |
~/.claude/history.jsonl |
No. Persists indefinitely, not swept by cleanupPeriodDays; claude project purge filters this project's lines |
| Session files |
~/.claude/sessions/ |
No. One file per running session, cleared when the session exits rather than age-swept; not in claude project purge's deletion list |
| Shell snapshots / backups |
~/.claude/shell-snapshots/, ~/.claude/backups/ |
No. Swept by cleanupPeriodDays, but not project-scoped, so claude project purge leaves them untouched |
| Claude Desktop / claude.ai memory |
server-side account |
Direction only. See context/desktop.md |
Argument parsing
| Argument |
Action |
(none) or status |
Report the auto-memory posture: effective enabled/disabled state, where the store lives, what it holds. Read-only. |
status all |
Machine-wide: the status report plus a table of EVERY per-project memory store (scripts/enumerate-all-projects.sh). Read-only. |
disable |
Turn auto memory off durably (autoMemoryEnabled: false + CLAUDE_CODE_DISABLE_AUTO_MEMORY). Edits settings. Confirm scope first. |
purge |
Destructive. Delete the auto-memory files. Reads autoMemoryDirectory at every scope first, shows a manifest, offers an opt-in pre-delete backup, and deletes only after explicit confirmation. |
purge all |
Destructive, machine-wide. Same flow with every per-project store as the candidate set, one combined manifest, and ONE combined gate stating the total count and every directory. |
Precedence (documented)
CLAUDE_CODE_DISABLE_AUTO_MEMORY overrides autoMemoryEnabled: per the env-vars doc, =1
disables and =0 forces auto memory on even when autoMemoryEnabled: false would disable
it. When the env var is unset, autoMemoryEnabled (by settings precedence) governs. So a set
env var of 0 alongside autoMemoryEnabled: false means auto memory is effectively on.
status must report the env var as authoritative whenever it is set. disable sets the env
var to 1 (the authoritative lever) and autoMemoryEnabled: false together. See the
reference file's "Precedence: the env var overrides the setting (VERIFIED)".
Actions
- status (default): load context/status.md.
- disable: load context/disable.md.
- purge: load context/purge.md.
For the Claude Desktop / claude.ai account store (server-side, not local files), load
context/desktop.md. Relevant to status and purge whenever the user
wants to be stateless everywhere, not just in this repo.
Gotchas
- Precedence:
CLAUDE_CODE_DISABLE_AUTO_MEMORY overrides autoMemoryEnabled (=0 forces
on even against autoMemoryEnabled: false). A set env var is authoritative in status. (See above.)
autoMemoryDirectory relocates the store and is read from any scope. The snapshot
prints the slug-derived default only. purge and status must read the override at every
scope or they act on the wrong directory.
CLAUDE_CONFIG_DIR relocates the whole config root: when set, the user settings.json
and the projects/<project>/memory/ tree live under it, not ~/.claude. All scope and
memory-dir resolution honors ${CLAUDE_CONFIG_DIR:-~/.claude} (scripts + workflows); the
snapshot reports the resolved root, and purge's relocation check treats it as expected.
- Windows managed policy can live in the registry (
HKLM/HKCU\SOFTWARE\Policies\ClaudeCode),
not a file. scope-report.sh can't read it. Report managed scope as unread, don't assume empty.
disable applies next session, not immediately: the setting and env block are read at
startup. Tell the user to restart / start a new session.
- Tracked
settings.json: a live edit to a dotfile-manager-tracked settings file must be
backfilled to the source; never run an apply that could revert the edit.
- Desktop / claude.ai memory is server-side.
purge cannot delete it; give direction only.
Repo-agnostic contract
Discover the consumer's state at runtime. Never hardcode a machine's paths or current
posture. Settings scopes, the memory directory, and the env var are read fresh from the
snapshot above and the workflow scripts. The bundled scope-report.sh reuses the plugin's
single-source memory-dir resolver (skills/audit/scripts/resolve-memory-dir.sh) rather than
re-implementing slug derivation.
1---2name: stateless3description: Inspect and turn off Claude Code's auto memory, the notes Claude writes itself per repo under ~/.claude/projects/<project>/memory/. Use when: 'make Claude stateless', 'stop Claude remembering', 'disable auto memory', 'turn off auto-memory', 'purge/clear/delete auto memory', 'wipe what Claude saved about this repo', 'does Claude have saved memories'. Actions: status (default, memory + settings across all scopes), disable (autoMemoryEnabled:false + CLAUDE_CODE_DISABLE_AUTO_MEMORY), purge (destructive delete, confirm-gated). Auto-memory only, not CLAUDE.md/rules (use /claude-memory:audit) and not transcripts/history.4---56## Auto-memory snapshot78```!9bash "${CLAUDE_PLUGIN_ROOT}/skills/stateless/scripts/scope-report.sh" || echo "(snapshot unavailable — run the scope-report script manually)"10```1112# Stateless1314Inspect and disable Claude Code **auto memory**, the store Claude writes for itself, one15directory per repo (`~/.claude/projects/<project>/memory/`, relocatable via16`autoMemoryDirectory`). Governs auto-memory only. Not in scope: CLAUDE.md / CLAUDE.local.md /17`.claude/rules/` (use `/claude-memory:audit`), transcripts, history, or shell snapshots. For the18official full per-project wipe, use `claude project purge`. What it does and does not delete is19quoted verbatim in20[reference/official-guidance.md](reference/official-guidance.md); the deletion plan and flags live21in the [claude-directory doc](https://code.claude.com/docs/en/claude-directory).2223Criteria and exact doc quotes live in [reference/official-guidance.md](reference/official-guidance.md);24re-fetch the source pages listed there if a fact is load-bearing before you act.2526## Scope2728| Entity | Location | This skill |29|--------|----------|-----------|30| Auto-memory store | `~/.claude/projects/<project>/memory/` (or `autoMemoryDirectory`) | Yes. Status / disable / purge |31| `autoMemoryEnabled` setting | any settings scope | Yes. Reads and writes |32| `CLAUDE_CODE_DISABLE_AUTO_MEMORY` | OS env or settings `env` block | Yes. Reads and writes |33| CLAUDE.md / `.claude/rules/` | repo + user | No. Use `/claude-memory:audit` |34| CLAUDE.local.md | repo only, no user-scope equivalent | No. Use `/claude-memory:audit` |35| Transcripts | `~/.claude/projects/<project>/` | No. Auto-cleaned by `cleanupPeriodDays`; `claude project purge` deletes this project's now |36| Prompt history | `~/.claude/history.jsonl` | No. Persists indefinitely, not swept by `cleanupPeriodDays`; `claude project purge` filters this project's lines |37| Session files | `~/.claude/sessions/` | No. One file per running session, cleared when the session exits rather than age-swept; not in `claude project purge`'s deletion list |38| Shell snapshots / backups | `~/.claude/shell-snapshots/`, `~/.claude/backups/` | No. Swept by `cleanupPeriodDays`, but not project-scoped, so `claude project purge` leaves them untouched |39| Claude Desktop / claude.ai memory | server-side account | Direction only. See [context/desktop.md](context/desktop.md) |4041## Argument parsing4243| Argument | Action |44|----------|--------|45| *(none)* or `status` | Report the auto-memory posture: effective enabled/disabled state, where the store lives, what it holds. Read-only. |46| `status all` | Machine-wide: the `status` report plus a table of EVERY per-project memory store (`scripts/enumerate-all-projects.sh`). Read-only. |47| `disable` | Turn auto memory off durably (`autoMemoryEnabled: false` + `CLAUDE_CODE_DISABLE_AUTO_MEMORY`). Edits settings. Confirm scope first. |48| `purge` | **Destructive.** Delete the auto-memory files. Reads `autoMemoryDirectory` at every scope first, shows a manifest, offers an opt-in pre-delete backup, and deletes only after explicit confirmation. |49| `purge all` | **Destructive, machine-wide.** Same flow with every per-project store as the candidate set, one combined manifest, and ONE combined gate stating the total count and every directory. |5051## Precedence (documented)5253`CLAUDE_CODE_DISABLE_AUTO_MEMORY` **overrides** `autoMemoryEnabled`: per the env-vars doc, `=1`54disables and `=0` forces auto memory *on* even when `autoMemoryEnabled: false` would disable55it. When the env var is unset, `autoMemoryEnabled` (by settings precedence) governs. So a set56env var of `0` alongside `autoMemoryEnabled: false` means auto memory is effectively **on**.57`status` must report the env var as authoritative whenever it is set. `disable` sets the env58var to `1` (the authoritative lever) and `autoMemoryEnabled: false` together. See the59reference file's "Precedence: the env var overrides the setting (VERIFIED)".6061## Actions6263- **status** (default): load [context/status.md](context/status.md).64- **disable**: load [context/disable.md](context/disable.md).65- **purge**: load [context/purge.md](context/purge.md).6667For the Claude Desktop / claude.ai account store (server-side, not local files), load68[context/desktop.md](context/desktop.md). Relevant to `status` and `purge` whenever the user69wants to be stateless everywhere, not just in this repo.7071## Gotchas7273- **Precedence**: `CLAUDE_CODE_DISABLE_AUTO_MEMORY` overrides `autoMemoryEnabled` (`=0` forces74 on even against `autoMemoryEnabled: false`). A set env var is authoritative in `status`. (See above.)75- **`autoMemoryDirectory` relocates the store** and is read from *any* scope. The snapshot76 prints the slug-derived default only. `purge` and `status` must read the override at every77 scope or they act on the wrong directory.78- **`CLAUDE_CONFIG_DIR` relocates the whole config root**: when set, the user `settings.json`79 *and* the `projects/<project>/memory/` tree live under it, not `~/.claude`. All scope and80 memory-dir resolution honors `${CLAUDE_CONFIG_DIR:-~/.claude}` (scripts + workflows); the81 snapshot reports the resolved root, and `purge`'s relocation check treats it as expected.82- **Windows managed policy** can live in the registry (`HKLM`/`HKCU\SOFTWARE\Policies\ClaudeCode`),83 not a file. `scope-report.sh` can't read it. Report managed scope as unread, don't assume empty.84- **`disable` applies next session**, not immediately: the setting and `env` block are read at85 startup. Tell the user to restart / start a new session.86- **Tracked `settings.json`**: a live edit to a dotfile-manager-tracked settings file must be87 backfilled to the source; never run an `apply` that could revert the edit.88- **Desktop / claude.ai memory is server-side**. `purge` cannot delete it; give direction only.8990## Repo-agnostic contract9192Discover the consumer's state at runtime. Never hardcode a machine's paths or current93posture. Settings scopes, the memory directory, and the env var are read fresh from the94snapshot above and the workflow scripts. The bundled `scope-report.sh` reuses the plugin's95single-source memory-dir resolver (`skills/audit/scripts/resolve-memory-dir.sh`) rather than96re-implementing slug derivation.