Plugin safety: third-party plugins can silently disable auto_memory via env vars
Resolved 💬 5 comments Opened Jun 8, 2026 by HN84956371-code Closed Jul 15, 2026
Summary
A third-party plugin (claude-mem by thedotmack) silently disables Claude Code's built-in auto_memory system during installation by writing CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 to ~/.claude/settings.json env block. There is no user confirmation, no warning, and no protection against this.
This caused a power user with 75+ accumulated memory files to experience complete apparent memory loss on their next session.
The Problem
CLAUDE_CODE_DISABLE_AUTO_MEMORYis an official env var toggle (per #23544)- Any plugin installer can write to
~/.claude/settings.jsonfreely - There is no mechanism to:
- Warn users when a plugin modifies core behavior settings
- Require user consent before disabling built-in features
- Sandbox plugin installers from modifying global settings
- Show what settings changed after plugin installation
What Happened
- User had 75 memory files (user profile, 25+ behavioral rules, 20+ active projects) in
memory/MEMORY.md - Installed claude-mem plugin
- Plugin's
install.ts→disableClaudeAutoMemory()wroteCLAUDE_CODE_DISABLE_AUTO_MEMORY=1 - Next session: Claude had zero memory, didn't recognize the user
- Memory files were intact on disk but not loaded
- User spent ~30 minutes diagnosing what appeared to be catastrophic data loss
Suggestion
- Protected settings: Core behavior toggles like auto_memory should require explicit user action (e.g.
claude config set auto_memory false), not be silently writable by plugin installers - Settings change audit: After plugin installation, show a diff of what changed in settings.json
- Plugin manifest declarations: Require plugins to declare in their manifest what settings they modify, and surface this to users before installation
- Sandboxing: Plugin installers should not have unrestricted write access to
~/.claude/settings.json
Environment
- Claude Code: latest (Opus 4.6)
- Plugin: claude-mem v13.4.0 (thedotmack)
- OS: Windows 11
- Related issue on plugin repo: https://github.com/thedotmack/claude-mem/issues/2836
---
Reported via Claude Code session 2026-06-08.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗