Skip to content

Feature request: add / command to remove drawers from a wing #848

@robottwo

Description

@robottwo

Problem

When files are mined into a wing, there is no way to remove or reassign the resulting drawers. This causes issues in several scenarios:

  1. Wrong wing — If a file is accidentally mined into the wrong wing (e.g., career data in wing_personal instead of wing_career), there is no way to undo it. The only workaround is to mine the file into the correct wing (creating duplicates) and live with the stale entries.

  2. Stale source references — If a source file is deleted or moved after mining, the vector index retains broken file path references. Search results reference files that no longer exist on disk, producing errors like: The source file isn't on disk but it's in the vector index.

  3. Data hygiene — Over time, outdated or incorrect drawers accumulate with no way to prune them. mempalace repair rebuilds the index but does not remove drawers with broken source references.

Proposed Solution

Add a mempalace delete (or prune / remove) command with options like:

# Delete all drawers from a specific source file
mempalace delete --source /path/to/file.md

# Delete all drawers in a wing/room
mempalace delete --wing wing_personal --room general

# Delete drawers matching a query
mempalace delete --query "stale keyword"

# Dry run
mempalace delete --source /path/to/file.md --dry-run

Current Workaround

  • Mine the file into the correct wing (creates duplicates in search results)
  • Restore from ~/.mempalace/palace.backup after mempalace repair and re-mine only the files you want (fragile, loses any drawers not backed up from source)
  • Manually edit the chroma SQLite database (dangerous, not recommended)

Environment

  • mempalace installed via uv tool install mempalace
  • Palace stored locally at ~/.mempalace/palace
  • 6,800+ drawers across 20+ rooms

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mcpMCP server and toolsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions