Conversation
…hooks (danielmiessler#2079) defaultMode "auto" steers file writes to Bash, and ISASync, CheckpointPerISC, ConfigEvalFire and SystemChangeSurface are registered on Write/Edit/MultiEdit only, so an ISA written by heredoc never reaches work.json, the per-claim commit never fires, the eval suite never runs and the SYSTEM disclosure line stays silent. BashWriteRelay.hook.ts (PostToolUse, matcher Bash) finds files changed under a bounded set of watched roots since its last run for the session and replays the four hooks with a synthesized Write payload carrying file_path. mtime narrows the candidates; a content hash against a shared per-path claims ledger decides, so byte-identical rewrites and sibling sessions' writes are never attributed (first claimer wins, exactly once). Never parses the command. The first Bash call of a session only records a baseline; change sets over 40 files are logged and skipped; every failure path exits 0 with no output. Registered in hooks.json on the existing Bash matcher; documented in HookSystem.md. Verified on a live install: a Bash-only edit to a registered ISA moved its work.json progress and produced the SYSTEM line on the same call; a no-change scan costs 0.02 s wall; four concurrent sessions ran the claims ledger without double attribution. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KdVkxUPGxFm91bsNDxyi5M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2079.
The problem
permissions.defaultMode: "auto"tells the model to prefer Bash for file writes, and ISASync, CheckpointPerISC, ConfigEvalFire and SystemChangeSurface are registered on Write/Edit/MultiEdit only. A file written by heredoc or a script therefore fires none of them: an ISA never reaches work.json, the per-claim commit never runs, the eval suite never fires, and the SYSTEM disclosure line stays silent. Reproduced on a live install exactly as the issue describes.The change
One new hook and one registration line; the four existing hooks are untouched.
hooks/BashWriteRelay.hook.ts(PostToolUse, matcherBash):file_path, and returns theiradditionalContextconcatenatedRegistered in
hooks/hooks.jsonon the existing Bash matcher. Documented inHookSystem.md.Verification
bun build --no-bundle --target=bunpasses.Known limit
A brand-new project ISA outside MEMORY/WORK written by Bash is invisible until it is first touched by Write or registered; MEMORY/WORK ISAs and already-registered paths are covered.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KdVkxUPGxFm91bsNDxyi5M