Repository navigation
Description
Version
codebase-memory-mcp 0.8.1
Platform
Windows 10 x64
Install channel
GitHub release archive / install.sh / install.ps1
Binary variant
standard
What happened, and what did you expect?
Summary
On Windows, installing codebase-memory-mcp creates extensionless hook files under:
%USERPROFILE%\.claude\hooks
Example:
cbm-code-discovery-gate
cbm-session-reminder
These files are Bash scripts (#!/bin/bash) without any executable extension.
When Cursor starts a new Agent, it scans the Claude hooks directory.
When Cursor starts a new Agent, the Windows "How do you want to open this file?" dialog appears.
Selecting Cursor opens one of the hook files (for example cbm-session-reminder) in the editor.
Removing or renaming %USERPROFILE%\.claude\hooks immediately eliminates the issue.
Environment
- OS: Windows 10 x64
- Cursor: 3.10.17
- codebase-memory-mcp: 0.8.1
- Claude Code: Not installed / Not used
Steps to reproduce
- Install
codebase-memory-mcpon Windows using the installer. - Verify that the installer creates:
%USERPROFILE%\.claude\hooks\
containing extensionless Bash scripts.
- Open Cursor.
- Create a new Agent.
Expected behavior
If Claude Code is not installed or the platform is Windows:
- do not install Bash hook files
- or install Windows-compatible hooks (
.cmd/.ps1) - or skip Claude hook installation entirely.
No OpenWith dialog should appear.
Actual behavior
Windows opens:
How do you want to open this file?
If Cursor is selected, the hook source file itself is opened in the editor.
For example:
- cbm-code-discovery-gate
- cbm-session-reminder
Suspected cause
The installer creates extensionless Bash hook files under %USERPROFILE%\.claude\hooks.
These files appear to trigger the OpenWith dialog during Cursor Agent startup on Windows.
I cannot say whether the underlying bug is in Cursor or in the installer, but the problem disappears as soon as the hook directory is removed or renamed.
Workaround
Renaming either of these fixes the issue immediately:
%USERPROFILE%\.claude
or
%USERPROFILE%\.claude\hooks
Since I do not use Claude Code, disabling the directory completely resolves the problem.
Suggestion
The Windows installer should detect the platform and either:
- skip Claude hook installation,
- generate Windows-native hook files,
- or only install Claude hooks if Claude Code is actually installed.
Reproduction
-
Install
codebase-memory-mcpon Windows using the official installer. -
Ensure the installer creates hook files under:
%USERPROFILE%.claude\hooks
such as:
- cbm-code-discovery-gate
- cbm-session-reminder
-
Open Cursor.
-
Open any project.
-
Click New Agent (or start a new Agent session).
-
Windows immediately displays the "How do you want to open this file?" dialog.
-
If "Cursor" is selected in the dialog, Cursor opens the hook file itself (for example
cbm-session-reminder) instead of continuing normally. -
Rename either:
%USERPROFILE%.claude
or
%USERPROFILE%.claude\hooks
-
Restart Cursor.
-
Create another new Agent.
-
The OpenWith dialog no longer appears.
Logs
Diagnostics trajectory (memory / performance / leak issues)
Project scale (if relevant)
No response
Confirmations
- I searched existing issues and this is not a duplicate.
- My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
Activity
DeusData commentedon Jul 7, 2026
Thanks for the Windows hook report. Triage: high-priority Windows/editor integration bug under #394/#395.
Extensionless hook files causing an Open With dialog is a real install UX failure. The fix should keep Unix behavior unchanged while installing Windows-executable wrappers and covering the Windows hook path in smoke tests.
test(smoke): platform-branch the shim check for the Windows .cmd form
DeusData commentedon Jul 12, 2026
Fixed on main by b1502bf (merged in da4c006, PR #1057), shipping in v0.9.1.
On Windows, all three Claude hook scripts (
cbm-code-discovery-gate,cbm-session-reminder,cbm-subagent-reminder) now install as.cmdfiles with native cmd syntax instead of extensionless bash shims — and the installer removes the old extensionless twins on upgrade, so re-runningcodebase-memory-mcp install(orupdate) after upgrading eliminates the Open-With dialog trigger even for existing installs. Unix behavior is byte-identical.Since you hit this through Cursor scanning the hooks dir without even using Claude Code: after upgrading, one
codebase-memory-mcp installrun should clear it. If the dialog still appears afterwards, check%USERPROFILE%\.claude\hooksfor any remaining extensionless files and let me know what's in there — but the upgrade path is covered by a regression test, so I expect it clean. Thanks for the precise repro with the exact scan trigger.fix(install): Windows hook scripts get .cmd form; legacy files removed
fix(install): Windows hook scripts get .cmd form; legacy files removed
test(smoke): platform-branch the shim check for the Windows .cmd form