Repository navigation
Description
Tested on macOS, GStack installed under ~/.claude/skills/gstack/. /freeze does not actually block Edit/Write/MultiEdit tool calls outside its configured boundary. Investigation revealed three independent issues:
1. Install routine does not symlink skill bin/ directories
link_claude_skill_dirs() in ~/.claude/skills/gstack/setup (lines 373-411) symlinks SKILL.md but not bin/. Result: ${CLAUDE_SKILL_DIR}/bin/check-freeze.sh referenced in the SKILL.md hook frontmatter resolves to a non-existent path. Same defect affects /careful and /browse.
Workaround applied locally:
ln -s ~/.claude/skills/gstack/freeze/bin ~/.claude/skills/freeze/bin
2. Install routine does not register PreToolUse hooks with Claude Code
Hook frontmatter in SKILL.md is decorative — Claude Code only fires hooks declared in ~/.claude/settings.json or in a plugin's hooks/hooks.json. GStack ships skills, not plugins, and the install routine doesn't write to settings.json. Result: even with the bin/ symlink in place, the hook never fires from a real Edit tool call.
Workaround applied locally (then reverted, see below):
Manually added to ~/.claude/settings.json:
{
"matcher": "Edit|Write|MultiEdit",
"hooks": [{
"type": "command",
"command": "bash ~/.claude/skills/freeze/bin/check-freeze.sh"
}]
}3. With the hook manually registered, deny decision is not enforced
After symlinking bin/ and adding the PreToolUse entry to settings.json pointing at check-freeze.sh:
- The hook fires on Edit attempts outside the boundary ✓
- A
boundary_denytelemetry entry gets written to~/.gstack/analytics/skill-usage.jsonl✓ - BUT the Edit tool returns success and the file is modified ✗
Test conditions: /freeze invoked via the Skill tool with boundary /tmp/freeze-test-in/. Attempted Edit on /tmp/freeze-test-out/foo.txt. File content changed from outside original to outside modified. Telemetry confirmed hook fired and classified the operation correctly:
{"event":"hook_fire","skill":"freeze","pattern":"boundary_deny","ts":"2026-05-13T02:11:06Z","repo":"cafe-route-tool"}
Likely candidates (not investigated): wrong JSON shape, wrong exit code, or wrong output stream — but the script's direct stdin test produces what looks like the right deny JSON:
{"permissionDecision":"deny","message":"[freeze] Blocked: /private/tmp/freeze-test-out/foo.txt is outside the freeze boundary (/private/tmp/freeze-test-in). Only edits within the frozen directory are allowed."}Net effect
/freeze appears to work (skill invocation succeeds, state file gets set) but provides no actual protection. Users get false confidence that edits outside the boundary will be blocked.
I've reverted the settings.json change locally — running it as a global PreToolUse without enforcement just adds telemetry noise to every Edit/Write in every session. The bin/ symlink remains in place since it doesn't hurt anything.
Happy to share full investigation transcripts if useful.
Environment: macOS, Claude Code (Sonnet/Opus), GStack installed via the standard setup script.
Activity
fix(setup): symlink skill bin/ dirs so PreToolUse hooks resolve (garr…
fix: symlink skill bin/ dirs + register PreToolUse hooks at install t…
fix: use hookSpecificOutput envelope + careful-active state guard (ga…
v1.35.0.1 fix: /freeze and /careful enforcement chain (garrytan#1459)
fix: symlink skill bin/ dirs + register PreToolUse hooks at install t…
fix: use hookSpecificOutput envelope + careful-active state guard (ga…
v1.35.0.1 fix: /freeze and /careful enforcement chain (garrytan#1459)
fix(setup): symlink skill bin/ dirs so PreToolUse hooks resolve (garr…
time-attack commentedon Jul 15, 2026
@jerry-sam The nested PreToolUse response and a consistent root for freeze state remain unresolved.
fix(hooks): freeze/careful emit PreToolUse decision trong hookSpecifi…
v1.64.0.0 fix wave: full tracker audit — 90 fixes, 52 issues closed, …
v1.80.0.0 fix: setup survives a failed Chromium install, hooks share …
feat(dsh): enforce the freeze boundary in the plugin's gate
capy-ai commentedon Oct 3, 2026
On current main the freeze hook emits its deny under
hookSpecificOutput, resolves the same state root as/freeze(includingGSTACK_HOME), and calls an absolute, install-rewritten path. A probe with a frozen directory returnedpermissionDecision: "deny"for an out-of-boundary Edit and{}for an in-boundary one.Fixed in v1.64.0.0 (#2571) and v1.80.0.0 (#2802).
If you still see this on the latest gstack, please reopen with details.