Skip to content

Commit 550bb98

Browse files
v1.35.0.1 fix: /freeze and /careful enforcement chain (#1459)
Three independent bugs all required for hooks to fire and enforce: Bug 1 — bin/ not symlinked (hook script unreachable) Bug 2 — hooks not registered in settings.json (never fires) Bug 3 — wrong hookSpecificOutput format (fires, deny ignored) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3f9096e commit 550bb98

5 files changed

Lines changed: 28 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## [1.48.3.0] - 2026-05-28
4+
5+
**`/freeze` and `/careful` now actually block. Three independent bugs — no bin/ symlink, no hook registration, wrong response format — were all required for the hooks to fire and enforce.**
6+
7+
The `/freeze` skill blocks Edit and Write outside a declared directory. `/careful` warns before destructive Bash commands. Both worked during skill invocation but provided zero actual enforcement. An Edit on a blocked file would succeed silently.
8+
9+
| Bug | Symptom | Root cause |
10+
|-----|---------|-----------|
11+
| Bug 1 | Hook script not found | `link_claude_skill_dirs` symlinked `SKILL.md` but not `bin/` — hook scripts unreachable |
12+
| Bug 2 | Hook never fired | SKILL.md frontmatter `hooks:` is documentation only — setup never wrote to `~/.claude/settings.json` |
13+
| Bug 3 | Hook fired, deny ignored | Scripts returned a flat object; correct format requires `hookSpecificOutput` envelope |
14+
15+
Re-run `./setup` once to activate. After that, `/freeze` actually blocks edits outside the declared directory.
16+
17+
### Itemized changes
18+
19+
#### Fixed
20+
- **Bug 1** — `setup` and `gstack-relink` now symlink each skill's `bin/` alongside `SKILL.md`
21+
- **Bug 2** — `setup` registers PreToolUse hook entries in `~/.claude/settings.json` at install time
22+
- **Bug 3** — `check-freeze.sh` and `check-careful.sh` now output the correct `hookSpecificOutput` envelope
23+
24+
#### For contributors
25+
- `test/hook-scripts.test.ts`: freeze and careful tests assert `hookSpecificOutput` shape
26+
327
## [1.48.0.0] - 2026-05-26
428

529
## **Agents stop dropping AskUserQuestion options when there are 5+.** A new canonical preamble rule + runtime gate makes Conductor's 4-option cap a split-or-batch decision, not a silent trim.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.48.0.0
1+
1.48.3.0

freeze/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The hook reads `file_path` from the Edit/Write tool input JSON, then checks
8080
whether the path starts with the freeze directory. If not, it returns
8181
a `hookSpecificOutput` deny decision to block the operation.
8282

83-
The hook is registered globally in `~/.claude/settings.json` by the gstack
83+
The hook is registered globally in Claude Code's settings by the gstack
8484
installer. It is a no-op when no freeze state file exists, so it does not
8585
interfere in sessions where `/freeze` has not been invoked. The freeze
8686
boundary persists via the state file; `/unfreeze` clears it.

freeze/SKILL.md.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The hook reads `file_path` from the Edit/Write tool input JSON, then checks
7575
whether the path starts with the freeze directory. If not, it returns
7676
a `hookSpecificOutput` deny decision to block the operation.
7777

78-
The hook is registered globally in `~/.claude/settings.json` by the gstack
78+
The hook is registered globally in Claude Code's settings by the gstack
7979
installer. It is a no-op when no freeze state file exists, so it does not
8080
interfere in sessions where `/freeze` has not been invoked. The freeze
8181
boundary persists via the state file; `/unfreeze` clears it.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gstack",
3-
"version": "1.48.0.0",
3+
"version": "1.48.3.0",
44
"description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.",
55
"license": "MIT",
66
"type": "module",

0 commit comments

Comments
 (0)