Skip to content

fix(hooks): wire unverified-tag-ledger into settings and declare its subagent opt-out - #474

Closed
EdbertChan wants to merge 1 commit into
stack/EdbertChan/reflect/unverified-tag-ledger-20260911/refuse-cat-unverified-tag-turn-ran-check--356d181cfrom
stack/EdbertChan/reflect/unverified-tag-ledger-20260911/wire-unverified-tag-ledger-settings-declare--d4d2ab4e
Closed

fix(hooks): wire unverified-tag-ledger into settings and declare its subagent opt-out#474
EdbertChan wants to merge 1 commit into
stack/EdbertChan/reflect/unverified-tag-ledger-20260911/refuse-cat-unverified-tag-turn-ran-check--356d181cfrom
stack/EdbertChan/reflect/unverified-tag-ledger-20260911/wire-unverified-tag-ledger-settings-declare--d4d2ab4e

Conversation

@EdbertChan

@EdbertChan EdbertChan commented Sep 12, 2026

Copy link
Copy Markdown
Owner

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 from install.sh in the Claude settings merge block.

Updates claude.hook.json with subagent_stop.inherit: false and 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.

…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
@EdbertChan

Copy link
Copy Markdown
Owner Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(hooks): log CAT-UNVERIFIED tags instead of treating them as evidence #464
2 feat(hooks): refuse a CAT-UNVERIFIED tag from a turn that ran no check #468
3 fix(hooks): wire unverified-tag-ledger into settings and declare its subagent opt-out #474 👈

@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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 EdbertChan closed this Sep 12, 2026
@EdbertChan
EdbertChan deleted the stack/EdbertChan/reflect/unverified-tag-ledger-20260911/wire-unverified-tag-ledger-settings-declare--d4d2ab4e branch September 12, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant