{"version":"2.1.337","anchor":"bash-rm-guard-can-keep-folders-rmkeepsfolders","canonical_anchor":"bash-rm-guard-can-keep-folders-rmkeepsfolders","heading":"The guard against deleting files can now keep chosen folders safe","tier":"notice","area":"Bash Safety","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337\/e\/bash-rm-guard-can-keep-folders-rmkeepsfolders","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.337","markdown":"### The guard against deleting files can now keep chosen folders safe\n\nClaude Code's protection against the rm command can now be told to protect certain folders as well as the working folder\n\n**Unclear.** It is not clear what supplies the list of folders to keep, or whether a user can set it.\n\n**What**\n\nWhen Claude Code runs a shell command, it has a guard that limits what the `rm` command (the command that deletes files) is allowed to remove. That guard can now be given a list of folders to keep. When the list is given, the guard covers the current working folder plus those folders. Before, the guard took only a setting about the sandbox, which is the restricted space commands run in.\n\n**Why**\n\nIt gives extra folders the same protection from accidental deletion.\n\n- Area: Bash Safety\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}