Disable or remove hooks
To remove a hook, delete its entry from the settings JSON file.
To temporarily disable all hooks without removing them, set "disableAllHooks": true in your settings file. Claude Code reads the value left after settings precedence applies, so a "disableAllHooks": false in a project's .claude/settings.json overrides a true in your user settings. To turn hooks off for one run whatever the project's settings say, pass --settings '\{"disableAllHooks": true\}', which takes precedence over project and local settings. There is no way to disable an individual hook while keeping it in the configuration.
The disableAllHooks setting respects the managed settings hierarchy. If an administrator has configured hooks through managed policy settings, disableAllHooks set in user, project, or local settings can't disable those managed hooks. Only disableAllHooks set at the managed settings level can disable managed hooks. For the full reach of each level, see disableAllHooks.
Direct edits to hooks in settings files are normally picked up automatically by the file watcher.
Hook input and output
Command hooks receive JSON data via stdin and communicate results through exit codes, stdout, and stderr. HTTP hooks receive the same JSON as the POST request body and communicate results through the HTTP response body. This section covers fields and behavior common to all events. Each event's section under Hook events includes its specific input schema and decision control options.
On macOS and Linux, command hooks run in their own session without a controlling terminal. The hook process and any child processes can't open /dev/tty or send escape sequences directly to the Claude Code interface. Windows has no /dev/tty.
To surface a message to the user on any platform, return systemMessage in JSON output. Some events discard it or deliver it elsewhere, and each event's section says so. To trigger a desktop notification, set a window title, or ring the bell, return terminalSequence instead.