hooks.json: unknown keys (name, description, conditions) trigger a Claude Code load warning

Open Beginner friendly
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
shell
Domain
tooling

Research direction

Start with hooks/hooks.json and compare both matcher entries with Claude Code's accepted hook schema. Check hooks-config.json and lsp-hooks.sh to confirm extension filtering remains covered, then verify the warning is gone on plugin load and /reload-plugins without changing hook behavior.

Written by the indexing model from the issue text.

Description

Claude Code 2.1.274 warns at plugin load:

lsp-tools: hooks.json: unknown keys "name" in hooks.PostToolUse[0], "description" in hooks.PostToolUse[0], "conditions" in hooks.PostToolUse[0], "name" in hooks.PreToolUse[0], "description" in hooks.PreToolUse[0] ignored

Plugin: lsp-tools 0.4.0 (via zircote/lsp-marketplace), macOS.

Cause: hooks/hooks.json puts name, description and conditions on the matcher entries. Claude Code's hook schema only accepts matcher and hooks there, so the three keys are dropped and the warning prints on every session start and /reload-plugins.

Impact: cosmetic. The hooks still register and run. conditions.fileExtensions never took effect, but lsp-hooks.sh already filters by extension through hooks-config.json, so behaviour is unchanged.

Suggested fix: remove the three keys from both entries. The extension list is already covered by hooks-config.json; the descriptions can live in the README or a top-level comment field. Removing them locally clears the warning with no change in hook behaviour.

Dominant language
Shell
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.