Memory system cannot delete files — only create/overwrite
Resolved 💬 3 comments Opened Apr 12, 2026 by kyusic Closed Apr 15, 2026
Summary
The auto-memory system can create and update memory files via the Write tool, but cannot delete them. The Bash tool's sandbox does not include ~/.claude/projects/ in its write-allowed paths, so rm is blocked. The Write tool has no delete capability.
Steps to reproduce
- Save a memory (e.g., "remember that X") — works fine
- Ask to forget/delete the memory —
rmfails withRead-only file system - Only workaround is overwriting the file with empty content, leaving orphan files on disk
Expected behavior
When the user asks to forget a memory, the agent should be able to delete the corresponding file and remove it from MEMORY.md.
Possible fixes
- Add
~/.claude/projects/*/memory/to the Bash sandbox write-allow list - Or provide a dedicated
Deletetool for file removal - Or add a delete parameter to the
Writetool
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗