feat: add chop unwrap-hooks to reverse fix-hooks#58
Closed
AgusRdz wants to merge 4 commits into
Closed
Conversation
Claude Code silently drops updatedInput when multiple PreToolUse hooks match the same tool (anthropics/claude-code#15897), causing chop compression to be invisibly disabled. - chop doctor now detects competing Bash PreToolUse hooks from both settings.json and plugin hooks.json files, with a clear error and bug reference - chop init warns immediately on install if competing hooks exist - chop fix-hooks generates ~/.claude/hooks/chop-wrapper.sh combining all hooks into one (user chooses standard or wrapper approach) - Normalize git -C <path> in tracking history so commands display as plain "git status" regardless of how Claude constructs the invocation
golangci-lint, turbo, poetry, conda, pipenv, snyk, trivy, kustomize, argocd, flux, stern, vault, psql, mysql, sqlite3, glab, and mvnw were registered in the filter registry but absent from supportedCommands — the hook never intercepted them so their filters never ran.
When Anthropic resolves claude-code#15897, unwrap-hooks restores the standard direct chop hook and removes chop-wrapper.sh. It parses the wrapper's _run_hook lines and tells the user which plugin hooks to re-enable manually.
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.
Summary
chop unwrap-hookscommand to reverse thefix-hookswrapper approachchop-wrapper.shto extract embedded competing hook commandschop.exe hookin settings.json and deletes the wrapperWhen to use
Once Anthropic resolves claude-code#15897, users who ran
chop fix-hookscan runchop unwrap-hooksto return to the standard single-hook configuration.Test plan
chop unwrap-hookswith wrapper active → restores direct hook, removes wrapper, lists re-enable instructionschop unwrap-hookswith no wrapper → reports nothing to unwrapchop doctorafter unwrap →[ok] hook is installed and path is correct