[BUG] PostToolUse hooks not triggering in Desktop App

Resolved 💬 3 comments Opened Apr 2, 2026 by TimJi Closed Apr 5, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

PostToolUse hook configured in .claude/settings.json loads correctly (verified via /hooks), but does not trigger when the Edit tool is used in the Desktop App.

What Should Happen?

After the Edit tool completes, the PostToolUse hook should execute the configured command and show the output (statusMessage + command result) to the user.

Error Messages/Logs

No error messages — the hook simply does not fire. No statusMessage shown, no command output.

Steps to Reproduce

  1. Add a PostToolUse hook in .claude/settings.json:
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "command": "pnpm format:fix 2>&1 | tail -5; npx tsc --noEmit --pretty 2>&1 | head -20",
            "statusMessage": "Formatting & type-checking...",
            "timeout": 30,
            "type": "command"
          }
        ]
      }
    ]
  }
}
  1. Run /hooks to verify the hook is loaded — confirmed loaded
  2. Ask Claude to edit a file (triggers Edit tool)
  3. Observe: no hook execution, no statusMessage, no command output

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude 1.2.234 (2d1855) 2026-04-01T07:58:22.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Platform: macOS (Darwin 25.3.0)
App: Claude Code Desktop App
Hook works when verified manually (running the same command in terminal produces expected output)
Not yet tested in CLI (claude) to confirm if Desktop-only

View original on GitHub ↗

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