---
title: "Comment by Vic Moreno on \"A mascot that tells you when Claude Code is waiting: Electron, hooks and the Windows notification database\" | Hashnode"
description: "Reading the Windows notification database is a clever side door. Per the Claude Code docs, the Notification hook already fires on permission prompts and after 6"
url: "https://hashnode.com/posts/claude-mascot-electron-hooks-windows/6af332f20defdab8aa176a27/comment/6af360684b115f74badd861e"
---

[Discussion](https://hashnode.com/posts/claude-mascot-electron-hooks-windows/6af332f20defdab8aa176a27)

Comment [A mascot that tells you when Claude Code is waiting: Electron, hooks and the Windows notification database](https://hashnode.com/posts/claude-mascot-electron-hooks-windows/6af332f20defdab8aa176a27)

[Vic Moreno](https://hashnode.com/@itsvicmoreno)

[Nov 10](https://hashnode.com/posts/claude-mascot-electron-hooks-windows/6af332f20defdab8aa176a27/comment/6af360684b115f74badd861e)

Reading the Windows notification database is a clever side door. Per the Claude Code docs, the Notification hook already fires on permission prompts and after 60 s of idle input, so I'm curious what pushed you to the database: the 60 s delay, or sessions running outside the hooks?

[Oleg Che](https://hashnode.com/@olegche)

[Nov 11](https://hashnode.com/posts/claude-mascot-electron-hooks-windows/6af332f20defdab8aa176a27/comment/6af360684b115f74badd861e#reply-6af3d03eb826d524ee854a96)

Neither, strictly speaking. The main reason is sessions where the hook hasn’t been picked up yet. Claude Code reads hooks at session start, so an already-running session won’t have them until it’s restarted. Reading the notification database catches those sessions without a restart: Windows writes every toast from the Claude desktop app into wpndatabase.db, and a new row means “Claude is waiting for you”.

The second point is that the desktop app asks for permissions and asks questions without firing a Notification event. So I also hook PermissionRequest and PreToolUse for AskUserQuestion|ExitPlanMode.

So hooks are the primary path and the database is a fallback for older sessions. If the hook is set up from the start, you can do without it.

[Vic Moreno](https://hashnode.com/@itsvicmoreno)

[Nov 11](https://hashnode.com/posts/claude-mascot-electron-hooks-windows/6af332f20defdab8aa176a27/comment/6af360684b115f74badd861e#reply-6af4347ff20a36ef5d3e3e3b)

That restart gap is the part most hook setups miss, thanks for spelling it out. Hooking PreToolUse on AskUserQuestion|ExitPlanMode is a neat catch too. Does the database fallback still fire if the desktop app's toasts are muted in Focus mode?
