garrytan / garrytan/gstack

Safety Net plugin blocks preamble cleanup commands

Open
#474 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133k
Forks
19.9k
Avg merge
18h 46m
Merged PRs (30d)
26

Description

## Problem

Users running [claude-code-safety-net](https://github.com/kenryu42/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:

```bash
# 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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.