Skip to content

feat: add chop unwrap-hooks to reverse fix-hooks#58

Closed
AgusRdz wants to merge 4 commits into
mainfrom
feat/unwrap-hooks
Closed

feat: add chop unwrap-hooks to reverse fix-hooks#58
AgusRdz wants to merge 4 commits into
mainfrom
feat/unwrap-hooks

Conversation

@AgusRdz

@AgusRdz AgusRdz commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds chop unwrap-hooks command to reverse the fix-hooks wrapper approach
  • Parses the generated chop-wrapper.sh to extract embedded competing hook commands
  • Reinstalls the direct chop.exe hook in settings.json and deletes the wrapper
  • Prints which plugin hooks need to be manually re-enabled

When to use

Once Anthropic resolves claude-code#15897, users who ran chop fix-hooks can run chop unwrap-hooks to return to the standard single-hook configuration.

Test plan

  • chop unwrap-hooks with wrapper active → restores direct hook, removes wrapper, lists re-enable instructions
  • chop unwrap-hooks with no wrapper → reports nothing to unwrap
  • chop doctor after unwrap → [ok] hook is installed and path is correct

AgusRdz added 4 commits April 13, 2026 10:17
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.
@AgusRdz AgusRdz closed this Apr 13, 2026
@AgusRdz AgusRdz deleted the feat/unwrap-hooks branch April 13, 2026 16:55
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.

[BUG] updatedInput PreToolUse response does not work when multiple PreToolUse hooks are executed

1 participant