#3169·ECC

hooks.json: Claude Code warns "unknown keys" for id/description on all 24 matcher groups

Author: mattmattoxCreated Sep 19, 2026Updated Sep 28, 2026

Symptom

On every session start, Claude Code prints:

ecc: hooks.json: unknown keys "description" in hooks.PreToolUse[0], "id" in hooks.PreToolUse[0], "description" in hooks.PreToolUse[1], "id" in hooks.PreToolUse[1], "description" in hooks.PreToolUse[2] and 43 more ignored

Cause

hooks/hooks.json (v2.2.1, and marketplace HEAD 928c1dea) has 24 matcher groups. Each one carries id and description alongside matcher and hooks. Claude Code's hook schema only accepts matcher and hooks at that level, so it drops the 48 extra keys (24 × 2) and warns about them.

$ jq '[.hooks[]|.[]|select(has("id"))]|length' hooks/hooks.json
24

The hooks themselves still load and run. The only effect is a warning on every startup, which makes users suspect a broken install.

Why users can't just strip the keys

The ids are load-bearing for ECC's own tooling:

  • scripts/lib/install/claude-settings.js (~L149, ~L200) throws if a managed hook entry lacks a unique id.
  • scripts/ci/validate-hooks.js (~L192) errors on a missing or duplicate id when requiresStableIds is set.

So a local edit breaks the installer and validator, and the next plugin update overwrites it anyway.

Suggested fix

Keep the plugin-shipped hooks/hooks.json limited to the keys Claude Code accepts, and keep the metadata somewhere else. For example:

  • a sidecar file (e.g. hooks/hooks.meta.json) mapping event[index] or a command fingerprint to {id, description}, read by the installer and validator; or
  • generate the plugin-facing hooks.json from an annotated source file at build time, stripping id/description.

Either way, the installer's stable-id merge keeps working, and the startup warning goes away.