fix(hooks): wire unverified-tag-ledger into settings and declare its subagent opt-out - #474
Conversation
…subagent opt-out
CI caught the hook shipping unwired. Two repo gates failed on it:
FAIL: test_every_claude_hook_entrypoint_is_in_settings
AssertionError: Lists differ: ['unverified-tag-ledger/claude_prompt_reminder.py'] != []
FAIL: test_every_stop_hook_is_mirrored_or_opted_out_with_reason
(hook='unverified-tag-ledger', command='.../claude_stop_check.py')
The hook directory had both fragments but no install_claude_hook.py, install.sh
never called one, and claude.hook.json declared no subagent_stop stance -- so
the Stop and UserPromptSubmit entries never reached ~/.claude/settings.json.
Adds the installer on diu-stop's pattern (same idempotent per-hook-type merge,
since this hook also owns one Stop and one UserPromptSubmit fragment), calls it
from install.sh next to diu-stop's, and opts the Stop hook out of subagent
mirroring with a reason: the ledger is keyed by session id, so a subagent would
log its tags against the parent's ledger, and a subagent has no next user
prompt to be reminded at.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018u8S5ct3kFhosinSbybc7W
Change-Id: Id4d2ab4e768ee3ef0679a5fb382e8901534de171
Owner
Author
|
This pull request is part of a Mergify stack:
|
This was referenced Sep 12, 2026
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7851b994-f24c-49e6-a2cd-8f9bd590c918) |
EdbertChan
deleted the
stack/EdbertChan/reflect/unverified-tag-ledger-20260911/wire-unverified-tag-ledger-settings-declare--d4d2ab4e
branch
September 12, 2026 06:13
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.
CI caught the hook shipping unwired. Two repo gates failed on it:
FAIL: test_every_claude_hook_entrypoint_is_in_settings
AssertionError: Lists differ: ['unverified-tag-ledger/claude_prompt_reminder.py'] != []
FAIL: test_every_stop_hook_is_mirrored_or_opted_out_with_reason
(hook='unverified-tag-ledger', command='.../claude_stop_check.py')
The hook directory had both fragments but no install_claude_hook.py, install.sh
never called one, and claude.hook.json declared no subagent_stop stance -- so
the Stop and UserPromptSubmit entries never reached ~/.claude/settings.json.
Adds the installer on diu-stop's pattern (same idempotent per-hook-type merge,
since this hook also owns one Stop and one UserPromptSubmit fragment), calls it
from install.sh next to diu-stop's, and opts the Stop hook out of subagent
mirroring with a reason: the ledger is keyed by session id, so a subagent would
log its tags against the parent's ledger, and a subagent has no next user
prompt to be reminded at.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_018u8S5ct3kFhosinSbybc7W
Depends-On: #468
Note
Low Risk
Install-time merge into local settings only; behavior follows an established hook installer pattern with no auth or data-path changes.
Overview
Fixes CI failures where unverified-tag-ledger had hook fragments and scripts but never reached
~/.claude/settings.json.Adds
install_claude_hook.py(same idempotent, marker-based merge as diu-stop) for Stop (claude_stop_check.py) and UserPromptSubmit (claude_prompt_reminder.py), and invokes it frominstall.shin the Claude settings merge block.Updates
claude.hook.jsonwithsubagent_stop.inherit: falseand a documented reason so the Stop hook is not mirrored to subagents (session-scoped ledger and no next user prompt for reminders).Reviewed by Cursor Bugbot for commit 0fc2a13. Bugbot is set up for automated code reviews on this repo. Configure here.