Repository navigation
v7.33.0
Changed
-
Both write guards are now wired in exec form, as the
Stopguard has been since 6.12.0, so no shell sits between
Claude Code and either guard (CORE-625). The shipped.claude/settings.jsonwiresprotect-trusted-paths.cjsand
enforce-writes-scope.cjsas"command": "node"with"args": ["${CLAUDE_PROJECT_DIR}/.claude/hooks/<guard>.cjs"]
and"onFailure": "block", under the unchanged matcher. In the old shell form,
node "${CLAUDE_PROJECT_DIR}"/.claude/hooks/<guard>.cjs, the placeholder was substituted into ash -cstring
(Git Bash or PowerShell on Windows), so a project path containing", a backtick,$or\could stop the guard
from starting, or run text from the directory name. In exec form Claude Code startsnodedirectly with the path as
one argument. What the guards decide does not change, and no hook script changed.hook-wiring.test.cjsnow spawns
the committed entries without a shell on every platform (it no longer skips the guards on Windows, though CI runs on
Linux only). Each entry denies a trusted-doc write from a subdirectory, and also from a project whose path holds a
space,$, a backtick and". The negative controls: a relativeargspath does not start, the old shell-form
string fails the pin, and in that project the shell form does not start, while with only a space in the path it does.
pharn/LIMITS.md§7 replaces the path-character bound with the exec-form bullet. A project path containing\is
still not claimed, because the guards' own path folding reads a backslash as a separator.Exec form needs Claude Code 2.1.139 or later, the release whose changelog adds hook
args.onFailurecame in
2.1.295, so every client that blocks on a failed guard also hasargs. An older client was not measured. If it
ignoresargs, it starts barenode, which reads the hook payload on stdin as a script and exits 1 (measured with
Node 24.13.1), and the write goes through. On such a client, upgrade Claude Code, or keep the shell-form lines.Existing installs:
pharn updatefirst, then the wiring; roll back in the reverse order.pharn updatenever
editssettings.json, so an install keeps its shell-form lines, which still work, with the path bound above. Measured
with pharn-cli 0.23.0's owndiffHookWiring(itssrc/lib/hook-wiring.ts) on a 7.32.2settings.jsonagainst this
one:pharn statusreports the hook wiringmissingfor both guards, prints aREPLACEnote showing your line and
the shipped one for each, andpharn status --strictexits 1 until both are replaced. A pre-7.3.0 line without
onFailuregets the same twoREPLACElines, so one edit per guard clears both changes. For an install made on 6.0.0
this is the fourth hand edit ofsettings.json: anchoring (6.1.0), theStopentry (6.12.0),onFailure(7.3.0),
and this. No other hand edit is in this release.Why minor: the shipped wiring changed, and every install must copy it again for
pharn status --strictto pass.
Nothing an existing install runs stops working, so it is not major.MIN_CLIis unchanged, because pharn-cli writes
settings.jsononly when it is absent. The settings change and theLIMITS.mdedit were applied by the maintainer
outside the agent loop, before the build's reconciliation anchor (L68, L88). Record:
.dev/features/guard-exec-wiring/.