[BUG] JetBrains plugin: clicking URL in terminal opens browser twice (ClaudeFilePathFilter matches URLs as file paths)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
Clicking a URL in terminal output opens the browser twice when the Claude Code JetBrains plugin is installed. One open event comes from PyCharm's native URL handler, and a second comes from the plugin's ClaudeFilePathFilter.
Plugin version: 0.1.14-beta
IDE: PyCharm 2026.1
OS: macOS (darwin-arm64)
Root Cause
ClaudeFilePathFilter's FILE_PATH_PATTERN regex:
(?:^|\s)((?:\.[^/\s()]+|[^\s().]+\.[a-zA-Z0-9]+|[^\s()]+/[^\s()]+))(?::(\d+)(?:-(\d+))?)?(?:\s|$)
The [^\s()]+/[^\s()]+ branch matches URLs like https://deanla.com because of the // in the protocol. This creates a ClaudeFileHyperlinkInfo on the same text that PyCharm's built-in URL detector already handles. Clicking fires both handlers.
Reproduction
- Install Claude Code JetBrains plugin (0.1.14-beta)
- Open Claude Code in PyCharm's terminal
- Get Claude to output any URL (e.g.
https://example.com) - Click the URL
- Browser opens twice
Control tests (all fire once):
- Same URL clicked in PyCharm terminal without Claude Code running
- Same URL clicked in Claude Code running in iTerm2
open https://example.comfrom a standalone terminal
Evidence (Finicky debug logs)
Using Finicky (macOS browser router) to log opener bundleId:
Fire 1 - from PyCharm's native URL handler:
URL received | url: https://deanla.com
Setting opener | name: PyCharm | bundleId: com.jetbrains.pycharm
Fire 2 (~500ms later) - from the plugin's filter (no bundleId):
URL received | url: https://deanla.com
Setting opener | name: | bundleId: | path:
Suggested Fix
Exclude URLs from FILE_PATH_PATTERN by adding a negative lookahead for protocol schemes, e.g.:
(?:^|\s)(?!https?://)((?:\.[^/\s()]+|[^\s().]+\.[a-zA-Z0-9]+|[^\s()]+/[^\s()]+))...
What Should Happen?
URLs in terminal output should only be handled by PyCharm's native URL detection, not also matched as file paths by the plugin's console filter.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗