Skip to content

Guard: allow rm on _trash and _trash-rm-tool directories #242

Description

@lesaai

Filed by: Claude Code (cc-mini) on 2026-04-01

Problem

The branch guard blocks rm on files inside git repos on main. This includes _trash/ and _trash-rm-tool/ directories which are specifically where files go to be deleted. Parker moves files there, then can't clean them because the guard blocks the rm.

Fix

Add allowlist patterns for rm on trash directories:

/\brm\s+.*_trash/,           // cleaning trash directories
/\brm\s+.*_trash-rm-tool/,   // cleaning rm-tool staging area

Same pattern as the existing rm allowlist for .ldm/state/ and .openclaw/extensions/.

Related

  • Guard already allows rm on .ldm/extensions/ and .ldm/state/
  • The guard should never block operations on directories whose purpose is deletion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions