claude-code - 💡(How to fix) Fix User-level settings.json hooks silently ignored in v2.1.120 VSCode extension [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53774Fetched 2026-04-28 06:47:35
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×6

Hooks defined in user-level ~/.claude/settings.json are silently dropped at startup in Claude Code v2.1.120 running as the VSCode native extension. The same settings.json is read successfully for permissions, enabledPlugins, and additionalDirectories — only the hooks block is ignored. No error, warning, or telemetry surface notifies the user. Plugin-bundled hooks register normally.

This is a silent-failure regression: hooks that previously worked stop firing without any indication, breaking SessionStart/PostToolUse/PreCompact/SessionEnd contracts that downstream tooling depends on.

Error Message

Hooks defined in user-level ~/.claude/settings.json are silently dropped at startup in Claude Code v2.1.120 running as the VSCode native extension. The same settings.json is read successfully for permissions, enabledPlugins, and additionalDirectories — only the hooks block is ignored. No error, warning, or telemetry surface notifies the user. Plugin-bundled hooks register normally. Because there's no error or warning, the failure mode is invisible until downstream data goes missing.

Root Cause

Because there's no error or warning, the failure mode is invisible until downstream data goes missing.

Fix Action

Workaround

Move the hooks block from ~/.claude/settings.json into a project-level .claude/settings.json in each workspace cwd. Project-level hooks register and fire correctly. This requires duplicating the block across every working directory and is brittle for users with many projects.

Code Example

{
     "hooks": {
       "SessionStart": [
         {
           "hooks": [
             {
               "type": "command",
               "command": "echo 'hello' > C:/Users/User/hook-test.log",
               "timeout": 5
             }
           ]
         }
       ]
     }
   }

---

[DEBUG] Applying permission update: Adding 3 allow rule(s) to destination 'userSettings': [...]
[DEBUG] Loading hooks from plugin: superpowers
[DEBUG] Loading hooks from plugin: ralph-loop
[DEBUG] Loading hooks from plugin: hookify
[DEBUG] Loading hooks from plugin: security-guidance
[DEBUG] Loading hooks from plugin: episodic-memory
[DEBUG] Loading hooks from plugin: double-shot-latte
[DEBUG] Loading hooks from plugin: codex
[DEBUG] Registered 12 hooks from 23 plugins
RAW_BUFFERClick to expand / collapse

Summary

Hooks defined in user-level ~/.claude/settings.json are silently dropped at startup in Claude Code v2.1.120 running as the VSCode native extension. The same settings.json is read successfully for permissions, enabledPlugins, and additionalDirectories — only the hooks block is ignored. No error, warning, or telemetry surface notifies the user. Plugin-bundled hooks register normally.

This is a silent-failure regression: hooks that previously worked stop firing without any indication, breaking SessionStart/PostToolUse/PreCompact/SessionEnd contracts that downstream tooling depends on.

Expected

User-level ~/.claude/settings.json hooks block registers and fires alongside plugin-bundled hooks, as documented at https://docs.claude.com/en/docs/claude-code/hooks.

Actual

User-level hooks block is read into memory but never registered. Only plugin-bundled hooks fire.

Repro

  1. Install VSCode native extension anthropic.claude-code v2.1.120 on Windows 11.
  2. Place a ~/.claude/settings.json containing a hooks block, e.g.:
    {
      "hooks": {
        "SessionStart": [
          {
            "hooks": [
              {
                "type": "command",
                "command": "echo 'hello' > C:/Users/User/hook-test.log",
                "timeout": 5
              }
            ]
          }
        ]
      }
    }
  3. Open a workspace and start a Claude Code session in the extension.
  4. Observe: C:/Users/User/hook-test.log is never created.
  5. Inspect ~/AppData/Roaming/Code/logs/<session>/window1/exthost/Anthropic.claude-code/Claude VSCode.log.

Log evidence

The extension log shows settings.json is read (permissions update succeeds), but only plugin hooks register:

[DEBUG] Applying permission update: Adding 3 allow rule(s) to destination 'userSettings': [...]
[DEBUG] Loading hooks from plugin: superpowers
[DEBUG] Loading hooks from plugin: ralph-loop
[DEBUG] Loading hooks from plugin: hookify
[DEBUG] Loading hooks from plugin: security-guidance
[DEBUG] Loading hooks from plugin: episodic-memory
[DEBUG] Loading hooks from plugin: double-shot-latte
[DEBUG] Loading hooks from plugin: codex
[DEBUG] Registered 12 hooks from 23 plugins

There is no Loading hooks from user settings (or equivalent) line. The user-settings hooks block — in our case 16 hooks across 6 events — never appears in the registration count or any subsequent debug line.

Workaround

Move the hooks block from ~/.claude/settings.json into a project-level .claude/settings.json in each workspace cwd. Project-level hooks register and fire correctly. This requires duplicating the block across every working directory and is brittle for users with many projects.

Impact

Silent breakage of any user-level hook. In our case this disabled:

  • A SessionStart health-gate hook that surfaces RED/AMBER infrastructure status before the session begins (designed precisely to prevent silent infra failures).
  • A PostToolUse heartbeat that tracks tool use to a long-term context store.
  • PreCompact / SessionEnd hooks that capture conversation state to a Postgres-backed memory store.

Because there's no error or warning, the failure mode is invisible until downstream data goes missing.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Extension: anthropic.claude-code-2.1.120-win32-x64 (VSCode native extension)
  • claude.exe version per log: 2.1.120
  • VSCode: stable channel
  • Last working version (per our LCM data): 2.1.119 (hooks fired correctly through 26 Apr 07:59 UTC; broke after extension auto-update)

Suggested fix priorities

  1. Restore user-level hook registration in the extension's settings-loading path. Whichever branch loads permissions from userSettings should also load hooks.
  2. Surface a warning at startup when settings.json contains a hooks block but registration count of user-settings hooks is zero — would have caught this on day one.
  3. Add a claude config check or /hooks slash-command that reports which hooks are registered from which source (plugin vs user vs project), so users can self-diagnose.

extent analysis

TL;DR

The most likely fix is to restore user-level hook registration in the extension's settings-loading path, ensuring that the branch loading permissions from userSettings also loads hooks.

Guidance

  • Verify that the hooks block is correctly formatted in the ~/.claude/settings.json file and that the file is being read by the extension, as indicated by the successful loading of permissions.
  • Check the extension's code for any changes or updates that may have introduced this regression, particularly in the settings-loading path.
  • Consider implementing a warning or logging mechanism to notify users when settings.json contains a hooks block but registration count of user-settings hooks is zero.
  • As a temporary workaround, move the hooks block to a project-level .claude/settings.json in each workspace cwd, although this is brittle and requires duplication.

Example

No code snippet is provided as the issue is related to the extension's internal logic and settings loading.

Notes

The issue is specific to the anthropic.claude-code extension version 2.1.120 on Windows 11, and the last working version was 2.1.119. The suggested fix priorities provide a clear direction for resolving the issue.

Recommendation

Apply the workaround by moving the hooks block to a project-level .claude/settings.json in each workspace cwd until the extension is updated to restore user-level hook registration. This is a temporary solution to mitigate the impact of the regression.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix User-level settings.json hooks silently ignored in v2.1.120 VSCode extension [1 participants]