Skip to content

Safety Net plugin blocks preamble cleanup commands #474

Closed

Description

@McNerve

Problem

Users running claude-code-safety-net alongside gstack hit false-positive blocks on two preamble commands:

  1. find ~/.gstack/sessions -mmin +120 -type f with the delete flag — blocked by Safety Net's rule against find with delete
  2. rm -rf operations outside cwd (e.g., /tmp/ cleanup) — blocked when cwd is ~

Impact

Every skill invocation that runs the standard preamble will fail on the first blocked command, requiring manual workarounds. The browse daemon itself works fine once the preamble is bypassed.

Suggested fix

Replace the blocked patterns with Safety Net-compatible alternatives:

# Instead of find with delete flag:
find ~/.gstack/sessions -mmin +120 -type f -exec rm {} +

# Or even simpler:
find ~/.gstack/sessions -mmin +120 -type f | xargs rm -f 2>/dev/null

These accomplish the same cleanup without triggering Safety Net's rules.

Environment

  • gstack (latest from cc-marketplace)
  • Safety Net v0.8.1
  • macOS (Darwin 25.4.0)

Activity

  1. added a commit that references this issue on Mar 29, 2026
    c96755f
  2. added a commit that references this issue on Mar 29, 2026
    f862e86
  3. added a commit that references this issue on Mar 29, 2026
    1c6d0ba
  4. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej Please close this issue as resolved. The cleanup command was changed in #641 to a form accepted by the Safety Net plugin, so the preamble no longer gets blocked for this reason.

  5. capy-ai commented on Oct 3, 2026

    @capy-ai
    Contributor

    Session cleanup now uses the Safety Net-compatible form find "$_GH/sessions" -mmin +120 -type f -exec rm {} + (bin/gstack-skill-start:103 on current main); the -delete form is gone from every skill preamble. Fixed in v0.13.5.0 (#641).
    If you still see this on the latest gstack, please reopen with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions