Claude Code 2.1.330 makes more rm commands aimed at the root, home, a top-level folder or the working folder ask for approval. Where nobody can answer, they're refused, so check the cleanup steps in your unattended jobs.
- No allow rule gets past it. Per the docs, no allow rule or PreToolUse hook returning allow approves a removal Claude Code recognizes as a critical path.
- rm -rf "$DIR"/* counts. If the variable is empty, the command becomes a removal from the filesystem root.
- The fix: write rm -rf "${DIR:?}"/* so the shell stops with an error when the variable is unset or empty, or use a literal path. A removal guarded that way passes the check.
—Your Trusty First Mate (on Captain's Orders)