[FEATURE] Feature Request: Add "enabled" boolean property to Hook configurations for temporary disabling

Resolved 💬 3 comments Opened Dec 5, 2025 by coygeek Closed Feb 4, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Currently, managing Hooks in settings.json is binary: a hook is either present and active, or it must be deleted entirely.

I have a complex settings.json with multiple hooks for SessionStart, PreToolUse, etc. Sometimes, I need to temporarily disable a specific hook—for example, a heavy PreToolUse bash script like update-docs-before-commit.sh—while debugging or performing a specific task where that hook is unnecessary or disruptive.

To do this currently, I have to physically delete the JSON object from the array. If I want to use it again later, I have to remember the exact syntax, command path, and timeout settings to re-add it. This increases the risk of JSON syntax errors and makes configuration management cumbersome.

Proposed Solution

I propose adding an optional enabled boolean field to the Hook configuration object schema.

  • Default behavior: If the field is omitted, it defaults to true (current behavior).
  • Disabled behavior: If set to false, Claude Code parses the settings file but skips the execution of that specific hook.

Desired Configuration Example:

"PreToolUse": [
  {
    "matcher": "Bash",
    "hooks": [
      {
        "type": "command",
        "command": "\"$HOME/.claude/hooks/update-docs-before-commit.sh\"",
        "timeout": 300,
        "enabled": false  <-- New field to temporarily disable this specific hook
      },
      {
        "type": "command",
        "command": "\"$HOME/.claude/hooks/commit-quality-check.sh\"",
        "timeout": 300
      }
    ]
  }
]

Alternative Solutions

  • JSON Comments: Standard JSON does not support comments. If settings.json supported JSONC (JSON with comments), I could comment out the block, but strict JSON prevents this.
  • Renaming Events: I currently have to rename the key (e.g., changing PreToolUse to _PreToolUse) to "hide" it from the parser, but this disables all hooks under that event matcher, not just one specific script in the array.
  • Script Modification: I could modify the python/bash scripts themselves to exit early, but this requires editing code logic rather than configuration.

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

Scenario:
I have a PreToolUse hook configured for Bash commands that runs a script called update-docs-before-commit.sh. This script takes a long time to run (timeout is set to 300s).

  1. I am currently working on a quick experiment where I am running many bash commands rapidly.
  2. I do not want the documentation update script to trigger on every single bash command for this session.
  3. I open ~/.claude/settings.json.
  4. I locate the hook entry and add "enabled": false.
  5. I save the file.
  6. Claude Code continues to run my other hooks (like commit-quality-check.sh), but skips the documentation updater.
  7. Once my experiment is done, I simply change it back to "enabled": true.

Additional Context

This feature aligns with standard configuration patterns found in many other developer tools (e.g., VS Code Extensions, CI/CD pipeline steps) where resources can be toggled without destruction.

Current settings.json snippet showing the need:
My current config has multiple python scripts running on SessionStart. If I want to debug analyze_claude_md.py but don't want date_awareness.py running to reduce noise, I currently have to delete the entry for date_awareness.py entirely.

"SessionStart": [
  {
    "hooks": [
      {
        "type": "command",
        "command": "python3 \"$HOME/.claude/hooks/date_awareness.py\"",
        "enabled": false // This would be much better than deleting the block
      },
      {
        "type": "command",
        "command": "python3 \"$HOME/.claude/hooks/count/analyze_claude_md.py\""
      }
    ]
  }
]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗