[BUG] Plugin treats CLAUDE.md file as a directory when creating lock file
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?
Description
The Claude Code plugin crashes on startup when the project contains a CLAUDE.md file (which is the standard project instructions file for Claude Code CLI). The plugin attempts to create a lock file at CLAUDE.md/ide/<pid>.lock, treating CLAUDE.md as a directory instead of a file.
Steps to reproduce
- Have a
CLAUDE.mdfile in the project root (as recommended by Claude Code CLI) - Open the project in WebStorm with the Claude Code plugin enabled
- Plugin throws
FileNotFoundExceptionon startup
Error
com.intellij.diagnostic.PluginException: /path/to/project/CLAUDE.md/ide/57394.lock (Not a directory) [Plugin: com.anthropic.code.plugin]
Root cause is in LockFileUtil.createLockFile which constructs the lock file path relative to CLAUDE.md as if it were a directory.
Environment
- IDE: WebStorm 2025.x
- OS: macOS (Darwin 25.3.0)
- Plugin:
com.anthropic.code.plugin(Claude Code [beta])
What Should Happen?
Expected behavior
The plugin should use a different path for its lock file (e.g. .claude/ide/<pid>.lock) that doesn't conflict with the CLAUDE.md file.
Error Messages/Logs
com.intellij.diagnostic.PluginException: /path/to/project/CLAUDE.md/ide/57394.lock (Not a directory) [Plugin: com.anthropic.code.plugin]
Steps to Reproduce
- Have a
CLAUDE.mdfile in the project root (as recommended by Claude Code CLI) - Open the project in WebStorm with the Claude Code plugin enabled
- Plugin throws
FileNotFoundExceptionon startup
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
com.anthropic.code.plugin (Claude Code [beta])
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
IntelliJ IDEA terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗