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

  1. Save a memory (e.g., "remember that X") — works fine
  2. Ask to forget/delete the memory — rm fails with Read-only file system
  3. 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 Delete tool for file removal
  • Or add a delete parameter to the Write tool

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗