#3279·ECC

hooks_enabled=false (plugin userConfig) not honored at runtime; hook bootstrap crashes under CLAUDE_CONFIG_DIR profiles

Author: PennybagsCXCreated Sep 30, 2026Updated Oct 1, 2026

Bug: hooks_enabled=false (plugin userConfig) not honored at runtime; hook bootstrap crashes under CLAUDE_CONFIG_DIR profiles

ECC: 2.2.2 (ecc@ecc, installed via claude plugin install ecc@ecc) Claude Code: 2.1.278 · OS: macOS (darwin 27.0.0)

Summary

Two related problems when ECC is installed as a Claude Code plugin into a secondary config dir (CLAUDE_CONFIG_DIR=~/.claude-ecc):

  1. The hooks_enabled userConfig option (default true, set to false via claude plugin install ecc@ecc --config hooks_enabled=false, stored under pluginConfigs in settings.json) is not referenced by any hook runtime code — the only matches in the tree are scripts/lib/claude-plugin-setup.js (CLI installer path) and hooks/README.md. Result: all 24 hook commands in hooks/hooks.json (PreToolUse:9, Stop:7, SessionStart:2, PreCompact:1, PostToolUse:2, PostToolUseFailure:2, SessionEnd:1) remain registered and attempt to run regardless of the config.
  2. The hook commands use an inline node -e bootstrap that resolves the ECC root from CLAUDE_PLUGIN_ROOT, else falls back to ~/.claude (path.join(os.homedir(), '.claude')) — ignoring CLAUDE_CONFIG_DIR. When the hook process doesn't receive CLAUDE_PLUGIN_ROOT, resolution lands on the main profile's .claude dir, require('scripts/hooks/plugin-hook-bootstrap.js') fails with node:internal/modules/cjs/loader:1433 (Cannot find module), and the SessionStart hook errors (non-blocking) on every session start.

Repro

bash
CLAUDE_CONFIG_DIR=~/.claude-ecc claude plugin marketplace add affaan-m/ECC
CLAUDE_CONFIG_DIR=~/.claude-ecc claude plugin install ecc@ecc --config hooks_enabled=false
CLAUDE_CONFIG_DIR=~/.claude-ecc claude          # fresh session in any dir

→ SessionStart:startup hook error — Failed with non-blocking status code: node:internal/modules/cjs/loader:1433

Verified empirically: with CLAUDE_PLUGIN_ROOT=<plugin cache> exported, the bootstrap runs cleanly (exit 0, emits valid SessionStart JSON) — so the failure is specifically the env-less homedir fallback.

Expected

  • hooks_enabled=false should disable plugin hooks at runtime (per its own description: "Disable this to keep skills and commands without local hook automation").
  • The bootstrap fallback should respect CLAUDE_CONFIG_DIR (or fail silently/consistently).

Workaround applied

Emptied the cached hook registry (hooks/hooks.json → {"hooks":{}}) in the plugin cache; original preserved as hooks.json.disabled-hooks-bak. Skills, agents, and commands continue to work.

Happy to provide further env details if useful.